the
offset
of
(
needle ,
haystack )
offset
(
needle ,
haystack )
Haystack and needle yield string
s.
The offset
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 csOffset
. For a regular expression-based version of this function, see regOffset
.
This function is similar to instr
, but the arguments are in reverse order.
csOffset
, regOffset
, trOffset
, instr
, csInstr
, regInstr
, trInstr
, rinstr
, csRinstr
, regRinstr
, trRinstr