# index-of
Find a substring in a string, or a value in a list. The string result
is a CODEPOINT index — the same coordinate system as `len`/`slice`/`nth`
(slice the hit with `$s($i .. ($i + n))`). Returns -1 (strings) or nil
(lists) when not found.
## Syntax
[index-of $s $substr]
## Examples
[index-of "a中b文c" "文"] # 3 (characters: a 中 b 文 → index 3) [index-of "hello" "z"] # -1
## Returns
Number, or -1/nil when absent.
## See Also
`slice`, `in?`, `re/find`