1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
7 * @copyright (c) 2007 Kohana Team
8 * @copyright (c) 2005 Harry Fuecks
9 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
11 function _strlen($str)
13 // Try mb_strlen() first because it's faster than combination of is_ascii() and strlen()
15 return mb_strlen($str);
17 if (utf8
::is_ascii($str))
20 return strlen(utf8_decode($str));