Update string.utils.php

This commit is contained in:
Namhyeon Go 2019-02-26 18:06:19 +09:00 committed by GitHub
parent c5c8deaa40
commit 4deace135a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,6 +139,24 @@ if(!check_function_exists("multi_strpos")) {
}
}
if(!check_function_exists("multi_str_split")) {
function multi_str_split($string, $delimiters) {
$strings = array();
if(is_string($string)) {
$offset = 0;
$pos = -1;
while($pos !== false) {
$offset = $pos + 1;
$pos = multi_strpos($string, $delimiters, $offset);
$strings[] = substr($string, $offset, $pos - $offset);
}
}
return $strings;
}
}
if(!check_function_exists("parse_pipelined_data")) {
function parse_pipelined_data($pipelined_data, $keynames=array()) {
$result = array();