How to get ucfirst()
working with scandinavic characters?
$str = "SÄKYLÄ";
echo ucfirst(strtolower($str)); //prints SÄkylÄ
One possibility is use mb_convert_case()
but I'd like to know if this is possible using ucfirst()
$str = "SÄKYLÄ";
echo mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); //prints Säkylä
Which function is faster for string capitalization?