note 59133 deleted from function.strtoupper by hholzgra

From: Date: Thu, 02 Aug 2012 13:06:13 +0000
Subject: note 59133 deleted from function.strtoupper by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189701@lists.php.net to get a copy of this message
Note Submitter: Vadim from Baku ---- 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.

« previous php.notes (#189701) next »