note 92584 added to function.ucfirst
| From: | bgschool at osu1 dot php dot net | Date: | Thu, 30 Jul 2009 11:39:08 +0000 |
| Subject: | note 92584 added to function.ucfirst | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158906@lists.php.net to get a copy of this message | ||
Simple function for use ucfirst with utf-8 encoded cyrylic text
public function capitalize_first($str) {
$line = iconv("UTF-8", "Windows-1251", $str); // convert to windows-1251
$line = ucfirst($line);
$line = iconv("Windows-1251", "UTF-8", $line); // convert back to utf-8
return $line;
}
----
Server IP: 217.75.128.29
Probable Submitter: 80.80.145.211
----
Manual Page -- http://www.php.net/manual/en/function.ucfirst.php
Edit -- https://master.php.net/note/edit/92584
Del: integrated -- https://master.php.net/note/delete/92584/integrated
Del: useless -- https://master.php.net/note/delete/92584/useless
Del: bad code -- https://master.php.net/note/delete/92584/bad+code
Del: spam -- https://master.php.net/note/delete/92584/spam
Del: non-english -- https://master.php.net/note/delete/92584/non-english
Del: in docs -- https://master.php.net/note/delete/92584/in+docs
Del: other reasons-- https://master.php.net/note/delete/92584
Reject -- https://master.php.net/note/reject/92584
Search -- https://master.php.net/manage/user-notes.php