diff options
author | Christian Schneider | 2012-03-28 13:40:12 +0000 |
---|---|---|
committer | Christian Schneider | 2012-03-28 13:40:12 +0000 |
commit | a7ac24d9f9698ff0a1d42268d79f74cd21f70eb4 (patch) | |
tree | 1ddae8a9e757a25e1033e234a5182245fb865a6e /it.class | |
parent | 2c7860119626cdf65fa4d7de38b7e0a1fdb816df (diff) | |
download | itools-a7ac24d9f9698ff0a1d42268d79f74cd21f70eb4.tar.gz itools-a7ac24d9f9698ff0a1d42268d79f74cd21f70eb4.tar.bz2 itools-a7ac24d9f9698ff0a1d42268d79f74cd21f70eb4.zip |
Fix it::ucwords and added tests for it::ucfirst and it::ucwords
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -432,7 +432,7 @@ static function ucfirst($string) */ static function ucwords($string) { - return preg_replace_callback('/\b\w/u', function($m) { return mb_strtoupper($m[1]); }, mb_strtolower($string)); + return preg_replace_callback('/\b\w/u', function($m) { return mb_strtoupper($m[0]); }, mb_strtolower($string)); } static function substr_replace($string, $replacement, $start, $length) |