#15097 [Opn->Csd]: mbstring_substr_count
| From: | moriyoshi@php.net | Date: | Sat, 09 Nov 2002 17:31:54 +0000 |
| Subject: | #15097 [Opn->Csd]: mbstring_substr_count | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24401@lists.php.net to get a copy of this message | ||
ID: 15097
Updated by: moriyoshi@php.net
Reported By: webmaster@devchina.com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: win2000
PHP Version: 4.1.1
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-07-07 13:05:38] derick@php.net
Refiling as feature request for the mbstring extension, where this kind
of stull should be implemented (as mb_substr_count()).
Derick
------------------------------------------------------------------------
[2002-01-22 08:07:19] martin@humany.com
This is not a bug. substr_count($haystack, $needle)
when haystack is "D¨D¨D" and needle is "D", it returns 3 of course,
since D is found 3 times in haystack
------------------------------------------------------------------------
[2002-01-18 06:50:52] webmaster@devchina.com
View my code:
$str1="D¨D¨D";
$str2="D";
print substr_count($str1,$str2);
return 3,right result is 1
the string "¨D" in Gb2312,is Chinese.
Used english is right,I don't konw where the problem in it.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15097&edit=1