strstr
Find the first occurrence of a string
&reftitle.description;
stringfalsestrstr
stringhaystack
stringneedle
boolbefore_needle&false;
Returns part of haystack string starting from and including the first
occurrence of needle to the end of
haystack.
This function is case-sensitive. For case-insensitive searches, use
stristr.
If you only want to determine if a particular needle
occurs within haystack, use the faster and less memory
intensive function strpos instead.
&reftitle.parameters;
haystack
The input string.
needle
&strings.parameter.needle.non-string;
before_needle
If &true;, strstr returns
the part of the haystack before the first
occurrence of the needle (excluding the needle).
&reftitle.returnvalues;
Returns the portion of string, or &false; if needle
is not found.
&reftitle.changelog;
&Version;
&Description;
8.0.0
Passing an &integer; as needle is no longer supported.
7.3.0
Passing an &integer; as needle has been deprecated.
&reftitle.examples;
strstr example
]]>
&reftitle.seealso;
stristr
strrchr
strpos
strpbrk
preg_match