Index

Arguments

Explanation

Returns the index of the start of the substring in the given string. Returns -1 if not found.

Examples

"Hello! Hi!".index("Hi") == 7
"Goats :D".index("Hi") == -1

Last updated