Document index and rindex (#389)
This commit is contained in:
1 parent
01f676041d
commit
c10e5f4e73
1 file changed
+11
@@ -1002,6 +1002,17 @@ sections:
|
||||
input: '{"foo": 12, "bar":[1,2,{"barp":12, "blip":13}]}'
|
||||
output: ['false']
|
||||
|
||||
- title: `index(s)`, `rindex(s)`
|
||||
body: |
|
||||
|
||||
Outputs the index of the first (`index`) or last (`rindex`)
|
||||
occurrence of `s` in the input.
|
||||
|
||||
examples:
|
||||
- program: '[index(", "), rindex(", ")'
|
||||
input: '"a,b, cd, efg, hijk"'
|
||||
output: ['[3,12]']
|
||||
|
||||
- title: `startswith`
|
||||
body: |
|
||||
|
||||
|
||||
Reference in new issue
Block a user