Update string.utils.php

This commit is contained in:
Namhyeon Go 2019-09-11 11:58:56 +09:00 committed by GitHub
parent 9c0e6d28e6
commit 51b17a3059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,12 +96,17 @@ if(!check_function_exists("get_splitted_strings")) {
$_len = get_string_length($str);
$_pos = 0;
while($_len > $_pos) {
if($len >= $_len) {
$strings[] = $str;
} else {
$__len = ceil($_len / $len);
for($i = 0; $i < $__len; $i++) {
$_pos = $len * $i;
$strings[] = get_cutted_string($str, $_pos, $len, $charset);
$_pos += $len;
}
if($_pos >= $_len) {
$strings[] = get_cutted_string($str, $_pos);
if($_len - $_pos > 0) {
$strings[] = $strings[] = get_cutted_string($str, $_pos);
}
}