1 <?php
defined('SYSPATH') OR die('No direct script access.');
7 * @copyright (c) 2007-2012 Kohana Team
8 * @copyright (c) 2005 Harry Fuecks
9 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
11 function _str_split($str, $split_length = 1)
13 $split_length = (int) $split_length;
15 if (UTF8
::is_ascii($str))
16 return str_split($str, $split_length);
18 if ($split_length < 1)
21 if (UTF8
::strlen($str) <= $split_length)
24 preg_match_all('/.{'.$split_length.'}|[^\x00]{1,'.$split_length.'}$/us', $str, $matches);