update page now
PHP 8.1.34 Released!

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

qeremy [atta] gmail [dotta] com
13 years ago
A proper Turkish solution;

<?php
function ucfirst_turkish($str) {
    $tmp = preg_split("//u", $str, 2, PREG_SPLIT_NO_EMPTY);
    return mb_convert_case(
        str_replace("i", "İ", $tmp[0]), MB_CASE_TITLE, "UTF-8").
        $tmp[1];
}

$str = "iyilik güzelLİK";
echo ucfirst($str) ."\n";   // Iyilik güzelLİK
echo ucfirst_turkish($str); // İyilik güzelLİK
?>

<< Back to user notes page

To Top