Document ltrimstr and rtrimstr
This commit is contained in:
1 parent
9fa2173825
commit
09104ce531
1 file changed
+22
@@ -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: |
|
||||
|
||||
|
||||
Reference in new issue
Block a user