index
expression function
Finds the first occurrence of a pattern in a string.
See also: rindex
Usage
index(source, pattern)
Returns the number of characters before pattern occurs in source. Returns -1 if the pattern is not found.
Examples
echo `index("Testing index", "sting")`
Prints 2
echo `index("Testing index", "i")`
Prints 4