Name
strspn
Synopsis
int strspn(stringstring
, stringcharacters
[, intoffset
[, intlength
]])
Returns the length of the substring in
string
that consists solely of characters
in characters
. If
offset
is positive, the search starts at
that character; if it is negative, the substring starts at the
character offset
characters from the
string’s end. If length
is given and is
positive, that many characters from the start of the substring are
checked. If length
is given and is
negative, the check ends length
characters
from the end of string
.
Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.