DLiteScript

strings.indexOf

Returns the index of the first occurrence of a substring.

Examples

1
2
printf("%g\n", strings.indexOf("hello world", "world")) // 6
printf("%g\n", strings.indexOf("hello world", "xyz"))   // -1