note 59133 added to function.strtoupper
| From: | VadimfromBaku at osu1 dot php dot net | Date: | Sun, 27 Nov 2005 09:55:38 +0000 |
| Subject: | note 59133 added to function.strtoupper | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99175@lists.php.net to get a copy of this message | ||
The following function counts uppercase letters in English and Cyrillic. It works great with
cyrillic when strtolower doesn't work due to enviroment settings.(Thank you Sean!).
preg_match_all("@[A-ZÀ-ß]@",$str,$m,PREG_OFFSET_CAPTURE)
It is probably displayed incorrectly due to page encoding, but there are range from the first
uppercase letter of the latin alphabet to the last one and range from the first uppercase cyrillic
alphabet letter to the last one in the pattern. Not sure but similar approach can work for other
alphabets.
----
Manual Page -- http://www.php.net/manual/en/function.strtoupper.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59133
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59133&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59133&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59133&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59133&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59133&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59133&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59133&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59133&report=yes
Search -- http://master.php.net/manage/user-notes.php