Частичная синхронизация с CMS
This commit is contained in:
parent
312f18a20a
commit
b26e521657
62 changed files with 827 additions and 5992 deletions
12
src/UTF8.php
Normal file
12
src/UTF8.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
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];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue