Skip to content

Commit db8e027

Browse files
committed
Add negative offset examples
1 parent ff34add commit db8e027

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/reference/eql/functions.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,14 @@ occurrence of the substring at or after the start position.
226226
indexOf(url.domain, ".") // returns 9
227227
indexOf(url.domain, ".", 9) // returns 9
228228
indexOf(url.domain, ".", 10) // returns 17
229+
indexOf(url.domain, ".", -6) // returns 9
229230
230231
// empty strings
231232
indexOf("", "") // returns 0
232233
indexOf(url.domain, "") // returns 0
233234
indexOf(url.domain, "", 9) // returns 9
234235
indexOf(url.domain, "", 10) // returns 10
236+
indexOf(url.domain, "", -6) // returns 0
235237
236238
// missing substrings
237239
indexOf(url.domain, "z") // returns null

0 commit comments

Comments
 (0)