Document ltrimstr and rtrimstr

This commit is contained in:
Nicolas Williams committed 2013-12-04 18:21:41 -06:00
1 parent 9fa2173825
commit 09104ce531
1 file changed
+22
+22
View File
@@ -853,6 +853,28 @@ sections:
input: '["foobar", "barfoo"]'
output: ['[false, true, true, false, false]']
- title: `ltrimstr`
body: |
Outputs its input with the given prefix string removed, if it
starts with it.
examples:
- program: '[.[]|ltrimstr("foo")]'
input: ["fo", "foo", "barfoo", "foobar", "afoo"]
output: ['["fo","","barfoo","bar","afoo"]']
- title: `rtrimstr`
body: |
Outputs its input with the given suffix string removed, if it
starts with it.
examples:
- program: '[.[]|rtrimstr("foo")]'
input: ["fo", "foo", "barfoo", "foobar", "foob"]
output: ['["fo","","bar","foobar","foob"]']
- title: `explode`
body: |