PHP 8.4.24 Released!

Voting

: eight plus one?
(Example: nine)

The Note You're Voting On

james at snasta dot ie
14 years ago
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Ú"
    ));
}
?>

<< Back to user notes page

To Top