summaryrefslogtreecommitdiffstats
path: root/system/helpers/inflector_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/inflector_helper.php')
-rw-r--r--system/helpers/inflector_helper.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index a133cdddb..b44594e2a 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.php
@@ -18,7 +18,7 @@
*
* @package CodeIgniter
* @author EllisLab Dev Team
- * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/)
+ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
* @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* @link http://codeigniter.com
* @since Version 1.0
@@ -188,7 +188,7 @@ if ( ! function_exists('underscore'))
*/
function underscore($str)
{
- return preg_replace('/[\s]+/', '_', strtolower(trim($str)));
+ return preg_replace('/[\s]+/', '_', trim(MB_ENABLED ? mb_strtolower($str) : strtolower($str)));
}
}
@@ -207,7 +207,7 @@ if ( ! function_exists('humanize'))
*/
function humanize($str, $separator = '_')
{
- return ucwords(preg_replace('/['.$separator.']+/', ' ', strtolower(trim($str))));
+ return ucwords(preg_replace('/['.$separator.']+/', ' ', trim(MB_ENABLED ? mb_strtolower($str) : strtolower($str))));
}
}
@@ -223,12 +223,13 @@ if ( ! function_exists('is_countable'))
*/
function is_countable($word)
{
- return ! in_array(strtolower($word),
- array(
- 'equipment', 'information', 'rice', 'money',
- 'species', 'series', 'fish', 'meta'
- )
- );
+ return ! in_array(
+ strtolower($word),
+ array(
+ 'equipment', 'information', 'rice', 'money',
+ 'species', 'series', 'fish', 'meta'
+ )
+ );
}
}