From a7ac24d9f9698ff0a1d42268d79f74cd21f70eb4 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Wed, 28 Mar 2012 13:40:12 +0000 Subject: Fix it::ucwords and added tests for it::ucfirst and it::ucwords --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it.class') diff --git a/it.class b/it.class index b4a0d9e..6a796d4 100644 --- a/it.class +++ b/it.class @@ -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) -- cgit v1.2.3