Utilisation de fonction cœur de PHP pour la gestion des accents majuscules
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a2f62c1c1c
commit
664a7220f9
@ -20,10 +20,5 @@
|
|||||||
*/
|
*/
|
||||||
function smarty_modifier_ucfirst($chaine)
|
function smarty_modifier_ucfirst($chaine)
|
||||||
{
|
{
|
||||||
$chaineS = strtr($chaine, "áàâäãéèêëẽíìîïĩóòôöõúùûüũýỳŷÿỹ", "ÁÀÂÄÃÉÈÊËẼÍÌÎÏĨÓÒÔÖÕÚÙÛÜŨÝỲŶŸỸ");
|
return mb_convert_case($chaine, MB_CASE_TITLE, 'UTF-8');
|
||||||
if ($chaineS[0].$chaineS[1] != $chaine[0].$chaine[1]) {
|
|
||||||
return $chaineS[0].$chaineS[1].substr($chaine, 2);
|
|
||||||
} else {
|
|
||||||
return ucfirst($chaine);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user