Update string.utils.php

This commit is contained in:
Namhyeon Go 2019-10-15 19:38:58 +09:00 committed by GitHub
parent e9b0a21300
commit 0d1925f168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,7 +223,7 @@ if(!check_function_exists("remove_utf8_bom")) {
if(!check_function_exists("get_tokenized_text")) {
function get_tokenized_text($text, $delimiters=array()) {
if(count($delimiters) > 0) {
return array_filter(multi_explode($delimiters, $text));
return array_values(array_filter(multi_explode($delimiters, $text)));
} else {
return preg_split('/\s+/', $text, -1, PREG_SPLIT_NO_EMPTY);
}