function strtoupper_tr($text = null) {
$text = str_replace(array(“ç”,”ö”,”ş”,”ü”,”ğ”,”ı”,”i”),array(“Ç”,”Ö”,”Ş”,”Ü”,”Ğ”,”I”,”İ”),$text);
return strtoupper($text);
}
function strtolower_tr($text = null) {
$text = str_replace(array(“Ç”,”Ö”,”Ş”,”Ü”,”Ğ”,”I”,”İ”),array(“ç”,”ö”,”ş”,”ü”,”ğ”,”ı”,”i”),$text);
return strtolower($text);
}
function ucfirst_tr($text = null) {
preg_match(“#(.){1}(.*)#iu”,$text,$match);
return strtoupper_tr($match[1]) . $match[2];
}
function lcfirst_tr($text = null) {
preg_match(“#(.){1}(.*)#iu”,$text,$match);
return strtolower_tr($match[1]) . $match[2];
}
function ucwords_tr($text= null) {
$words = explode(” “,$text);
foreach ($words as &$word) {
$word = ucfirst_tr($word);
}
return implode(” “,$words);
}
function lcwords_tr($text = null) {
$words = explode(” “,$text);
foreach ($words as &$word) {
$word = lcfirst_tr($word);
}
return implode(” “,$words);
}