Update string.utils.php
This commit is contained in:
parent
ea4527b915
commit
c5c8deaa40
|
@ -115,8 +115,13 @@ if(!check_function_exists("multi_explode")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!check_function_exists("multi_strpos")) {
|
if(!check_function_exists("multi_strpos")) {
|
||||||
function multi_strpos($string, $delimiters) {
|
function multi_strpos($string, $delimiters, $offset=0) {
|
||||||
$pos = false;
|
$pos = false;
|
||||||
|
|
||||||
|
if($offset > 0) {
|
||||||
|
$string = substr($offset);
|
||||||
|
}
|
||||||
|
|
||||||
foreach($delimiters as $s) {
|
foreach($delimiters as $s) {
|
||||||
$cur_pos = strpos($string, $s);
|
$cur_pos = strpos($string, $s);
|
||||||
if($cur_pos !== false) {
|
if($cur_pos !== false) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user