note 16962 deleted from function.ucfirst by nlopess
| From: | nlopess@php.net | Date: | Tue, 02 Mar 2004 15:28:55 +0000 |
| Subject: | note 16962 deleted from function.ucfirst by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66112@lists.php.net to get a copy of this message | ||
Note Submitter: bert@segment.info
----
Note that if you are using this function to embellish the display of Dutch or Spanish text, ucfirst
will not recognise your "ij"s (Dutch) or "ll"s (Spanish), which in their
respective languages need to be capitalised both when they go on the beginning of a word.
Use
function ucfirst_beter($streng) {
return
$streng=(substr(strtolower($streng),0,2)=="ij")?(strtoupper(substr($streng,0,
2)).substr($streng,2,(strlen($streng)-2))):(ucfirst($streng)); }
for Dutch text, or
function ucfirst_mejor($cuerda) {
return
$cuerda=(substr(strtolower($cuerda),0,2)=="ll")?(strtoupper(substr($cuerda,0,
2)).substr($cuerda,2,(strlen($cuerda)-2))):(ucfirst($cuerda)); }
for Spanish text
cheers,
Bert a.k.a. Alberto