Update string.utils.php
This commit is contained in:
parent
9c0e6d28e6
commit
51b17a3059
|
@ -96,12 +96,17 @@ if(!check_function_exists("get_splitted_strings")) {
|
||||||
|
|
||||||
$_len = get_string_length($str);
|
$_len = get_string_length($str);
|
||||||
$_pos = 0;
|
$_pos = 0;
|
||||||
while($_len > $_pos) {
|
if($len >= $_len) {
|
||||||
$strings[] = get_cutted_string($str, $_pos, $len, $charset);
|
$strings[] = $str;
|
||||||
$_pos += $len;
|
} else {
|
||||||
|
$__len = ceil($_len / $len);
|
||||||
if($_pos >= $_len) {
|
for($i = 0; $i < $__len; $i++) {
|
||||||
$strings[] = get_cutted_string($str, $_pos);
|
$_pos = $len * $i;
|
||||||
|
$strings[] = get_cutted_string($str, $_pos, $len, $charset);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_len - $_pos > 0) {
|
||||||
|
$strings[] = $strings[] = get_cutted_string($str, $_pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user