14 lines
No EOL
309 B
PHP
14 lines
No EOL
309 B
PHP
<?php
|
|
|
|
namespace ctiso;
|
|
|
|
class UTF8 {
|
|
static function str_split($str, $split_length = 1) {
|
|
$split_length = (int) $split_length;
|
|
|
|
$matches = array();
|
|
preg_match_all('/.{'.$split_length.'}|[^\x00]{1,'.$split_length.'}$/us', $str, $matches);
|
|
|
|
return $matches[0];
|
|
}
|
|
} |