note 106453 added to function.strtoupper
| From: | james at snasta dot ie | Date: | Thu, 10 Nov 2011 14:44:06 +0000 |
| Subject: | note 106453 added to function.strtoupper | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184373@lists.php.net to get a copy of this message | ||
In the Irish language certain initial mutations can never be capitalized â the following simple
function can be used to capitalize text in Irish.
i.e. Muintir na hÃireann -> MUINTIR NA hÃIREANN
<?php
function strtoupper_ga($a) {
return strtr(mb_strtoupper($a, "utf-8"), array(
" MB" => " mB",
" GC" => " gC",
" ND" => " nD",
" BHF" => " bhF",
" NG" => " nG",
" BP" => " bP",
" DT" => " dT",
" HA" => " hA",
" HE" => " hE",
" HI" => " hI",
" HO" => " hO",
" HU" => " hU",
" HÃ" => " hÃ",
" HÃ" => " hÃ",
" HÃ" => " hÃ",
" HÃ" => " hÃ",
" HÃ" => " hÃ"
));
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 89.101.58.245
----
Manual Page -- http://www.php.net/manual/en/function.strtoupper.php
Edit -- https://master.php.net/note/edit/106453
Del: integrated -- https://master.php.net/note/delete/106453/integrated
Del: useless -- https://master.php.net/note/delete/106453/useless
Del: bad code -- https://master.php.net/note/delete/106453/bad+code
Del: spam -- https://master.php.net/note/delete/106453/spam
Del: non-english -- https://master.php.net/note/delete/106453/non-english
Del: in docs -- https://master.php.net/note/delete/106453/in+docs
Del: other reasons-- https://master.php.net/note/delete/106453
Reject -- https://master.php.net/note/reject/106453
Search -- https://master.php.net/manage/user-notes.php