Functions

instr

Supported By

Syntax

[the] instr of ( haystack , needle )

instr ( haystack , needle )

Haystack and needle yield strings.

Description

The instr function returns the index of the first appearance of the string needle in the string haystack, starting at 1. If needle cannot be found in haystack, zero is returned.

This function is case-insensitive. For a case-sensitive version of this function, see csInstr. For a regular expression-based version of this function, see regInstr.

Note

This function is similar to offset, but the arguments are in reverse order.

See Also

csInstr, regInstr, trInstr, offset, csOffset, regOffset, trOffset, rinstr, csRinstr, regRinstr, trRinstr