Update string.utl.php

This commit is contained in:
Namhyeon Go 2018-09-28 15:30:24 +09:00 committed by GitHub
parent f2c6335f9d
commit 95da3a1a89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,6 +104,7 @@ if(!function_exists("read_storage_file_by_line")) {
}
}
// https://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php
if(!function_exists("startsWith")) {
function startsWith($haystack, $needle) {
$length = strlen($needle);
@ -122,6 +123,7 @@ if(!function_exists("endsWith")) {
}
}
// https://stackoverflow.com/questions/4955433/php-multiple-delimiters-in-explode/27767665#27767665
if(!function_exists("multiexplode")) {
function multiexplode($delimiters,$string) {
$ready = str_replace($delimiters, $delimiters[0], $string);