Command: Instr

Index // Instr


Format:

instr( string1, string2 )

Description:

Check to see if string2 is contained in string1. If it is, then this function will return the index of starting character of the first place where string2 occurs. Otherwise, this function will return 0. String indices begin at 1.

Example:

The line

print instr("Hello", "lo")
will print
4