Update string.utils.php

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

View File

@ -116,8 +116,8 @@ if(!check_function_exists("multi_explode")) {
if(!check_function_exists("multi_strpos")) {
function multi_strpos($string, $delimiters, $offset=0) {
$pos = strlen(string) - 1;
$d = array();
$last_pos = strlen($string) - 1;
$pos = $last_pos;
if($offset > 0) {
$string = substr($offset);
@ -130,7 +130,7 @@ if(!check_function_exists("multi_strpos")) {
}
}
return ($pos < 0) ? false : $pos;
return (($pos < $last_pos) ? $pos : false);
}
}