Specifications

6-4 Programmer’s Guide Sega
Psy-Q Development System
INSTR
Description This function searches a text string for a specified sub-string. If the string does not
contain the sub-string, the result of zero is returned; if the sub-string is present, the
result is the location of the sub-string from the start of the target text. It is also
possible to specify an alternate start point within the string via an optional parameter.
Syntax INSTR ([start,]string, sub-string)
See Also SUBSTR
Examples Mess equs "Demo for Sales Dept"
...
if instr("\Mess","Sales")
move.w Sa1Ind, d0
else
move.w AcInd, d0
endif
Note When returning the offset of a located sub-string, the INSTR function starts
numbering the characters in the target text from one.