int strpos(string $string1, string $string2)

int stripos(string $string1, string $string2)

Searches for $string2 in $string1 and returns the 0-based index into $string1 where $string2 starts.

The index is 0 based. For example, if $string2 is contained in the very beginning of $string1, then the function returns 0.

If $string2 is not in $string1, then the function returns -1.

stripos() used to be named getStringStartIndex() in versions prior to v14.00. This function name still works but is now deprecated.

strpos() performs a case-sensitive search while stripos() performs a case-insensitive search.

str[i]pos() is supported only in CSE HTML Validator v14.00 and later.