PHP 4.0 Bug #8034 Updated: string function (strcspn)
| From: | stas@php.net | Date: | Thu, 07 Dec 2000 10:49:29 +0000 |
| Subject: | PHP 4.0 Bug #8034 Updated: string function (strcspn) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40352@lists.php.net to get a copy of this message | ||
ID: 8034
Updated by: stas
Reported By: rottmann@inveris.de
Status: Closed
Bug Type: Strings related
Assigned To:
Comments:
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.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-29 11:03:40] rottmann@inveris.de
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
function???
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8034