note 105435 added to function.ucfirst
| From: | vlknmtn at gmail dot com | Date: | Wed, 17 Aug 2011 23:31:16 +0000 |
| Subject: | note 105435 added to function.ucfirst | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182551@lists.php.net to get a copy of this message | ||
Turkish solution:
<?php
mb_internal_encoding("UTF-8");
mb_regex_encoding("UTF-8");
function tr_ilkbuyuk($text)
{
$text = str_replace("I","ı",$text);
$text = mb_strtolower($text, 'UTF-8');
if($text[0] == "i")
$tr_text = "İ".substr($text, 1);
else
$tr_text = mb_convert_case($text, MB_CASE_TITLE, "UTF-8");
return trim($tr_text);
}
function tr_ucwords($text)
{
$p = explode(" ",$text);
if(is_array($p))
{
$tr_text = "";
foreach($p AS $item)
$tr_text .= " ".tr_ilkbuyuk($item);
return trim($tr_text);
}
else
return tr_ilkbuyuk($text);
}
$deger = "ıiÅllÅlsdg";
echo tr_ucwords($deger);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 178.243.102.127
----
Manual Page -- http://www.php.net/manual/en/function.ucfirst.php
Edit -- https://master.php.net/note/edit/105435
Del: integrated -- https://master.php.net/note/delete/105435/integrated
Del: useless -- https://master.php.net/note/delete/105435/useless
Del: bad code -- https://master.php.net/note/delete/105435/bad+code
Del: spam -- https://master.php.net/note/delete/105435/spam
Del: non-english -- https://master.php.net/note/delete/105435/non-english
Del: in docs -- https://master.php.net/note/delete/105435/in+docs
Del: other reasons-- https://master.php.net/note/delete/105435
Reject -- https://master.php.net/note/reject/105435
Search -- https://master.php.net/manage/user-notes.php