Update string.utils.php

This commit is contained in:
Namhyeon Go 2019-02-26 17:35:31 +09:00 committed by GitHub
parent f64f6a6f92
commit ea4527b915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,26 @@ if(!check_function_exists("multi_explode")) {
}
}
if(!check_function_exists("multi_strpos")) {
function multi_strpos($string, $delimiters) {
$pos = false;
foreach($delimiters as $s) {
$cur_pos = strpos($string, $s);
if($cur_pos !== false) {
if($pos !== false) {
if($pos > $cur_pos) {
$pos = $cur_pos;
}
} else {
$pos = $cur_pos;
}
}
}
return $pos;
}
}
if(!check_function_exists("parse_pipelined_data")) {
function parse_pipelined_data($pipelined_data, $keynames=array()) {
$result = array();