Section: String Functions
p = strstr(x,y)
where x
and y
are two strings. The returned integer p
indicates the index into the string x
where the substring y
occurs. If no instance of y
is found, then p
is set to
zero.
strstr
in action
--> strstr('hello','lo') ans = 4 --> strstr('quick brown fox','own') ans = 9 --> strstr('free stuff','lunch') ans = 0