<?php
/**
* @version $Id$
* @package utf8
* @subpackage strings
*/
//---------------------------------------------------------------
/**
* UTF-8 aware alternative to ucfirst
* Make a string's first character uppercase
* Note: requires utf8_strtoupper
* @param string
* @return string with first character as upper case (if applicable)
* @see http://www.php.net/ucfirst
* @see utf8_strtoupper
* @package utf8
* @subpackage strings
*/
function utf8_ucfirst($str){
switch ( utf8_strlen($str) ) {
case 0:
return '';
break;
case 1:
return utf8_strtoupper($str);
break;
default:
preg_match('/^(.{1})(.*)$/us', $str, $matches);
return utf8_strtoupper($matches[1]).$matches[2];
break;
}
}
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| mbstring/ | 2013-03-01 19:54 | 4.13 KB | 76129f60960:kunden | dxwrx-rx-r | |
| native/ | 2013-03-01 19:54 | 16.63 KB | 76129f60960:kunden | dxwrx-rx-r | |
| utils/ | 2013-03-01 19:54 | 52.66 KB | 76129f60960:kunden | dxwrx-rx-r | |
| LICENSE | 2013-03-01 19:53 | 25.81 KB | 76129f60960:kunden | -xw-x----- | |
| README | 2013-03-01 19:53 | 3.29 KB | 76129f60960:kunden | -xw-x----- | |
| index.html | 2013-03-01 19:53 | 31 B | 76129f60960:kunden | -xw-x----- | |
| ord.php | 2013-03-01 19:53 | 2.35 KB | 76129f60960:kunden | -xw-x----- | |
| str_ireplace.php | 2013-03-01 19:53 | 1.95 KB | 76129f60960:kunden | -xw-x----- | |
| str_pad.php | 2013-03-01 19:53 | 1.67 KB | 76129f60960:kunden | -xw-x----- | |
| str_split.php | 2013-03-01 19:53 | 824 B | 76129f60960:kunden | -xw-x----- | |
| strcasecmp.php | 2013-03-01 19:53 | 546 B | 76129f60960:kunden | -xw-x----- | |
| strcspn.php | 2013-03-01 19:53 | 894 B | 76129f60960:kunden | -xw-x----- | |
| stristr.php | 2013-03-01 19:53 | 855 B | 76129f60960:kunden | -xw-x----- | |
| strrev.php | 2013-03-01 19:53 | 458 B | 76129f60960:kunden | -xw-x----- | |
| strspn.php | 2013-03-01 19:53 | 923 B | 76129f60960:kunden | -xw-x----- | |
| substr_replace.php | 2013-03-01 19:53 | 600 B | 76129f60960:kunden | -xw-x----- | |
| trim.php | 2013-03-01 19:53 | 2.18 KB | 76129f60960:kunden | -xw-x----- | |
| ucfirst.php | 2013-03-01 19:53 | 787 B | 76129f60960:kunden | -xw-x----- | |
| ucwords.php | 2013-03-01 19:53 | 1.44 KB | 76129f60960:kunden | -xw-x----- | |
| utf8.php | 2013-03-01 19:53 | 2.22 KB | 76129f60960:kunden | -xw-x----- | |