go to bug id or search bugs for
why is "string function" not in the Type of bug: list??
$stringvalue = "xy.,.-,z1";
echo strspn (strtolower ($stringvalue), "abcdefghijklmnopqrstuvwxyz0123456789") . "<br>"; // right
echo strcspn (strtolower ($stringvalue), "abcdefghijklmnopqrstuvwxyz0123456789") . "<br>"; // wrong
the strspn returns the right value...
but strcpsn returns only the right value when the first digit is not in the 2nd string?!?!? or i did misunderstand the
Add a Patch
Add a Pull Request
For me strcspn returns 0, which is the correct result, since
strcspn is meant to return length of the segment that does
not contain any of the characters in the second arg. Since
"x" (the first character) is already there, the length is 0.