Update base.php
This commit is contained in:
parent
dcf19b6bcc
commit
e81f5a2485
|
@ -14,3 +14,18 @@ if(function_exists('array_key_empty')) {
|
|||
return $empty;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists("cut_str")) {
|
||||
function cut_str($str, $start, $len=0) {
|
||||
$cutted_str = "";
|
||||
if(function_exists("iconv_substr")) {
|
||||
$cutted_str = iconv_substr($str, $start, $len, "utf-8");
|
||||
} elseif(function_exists("mb_substr")) {
|
||||
$cutted_str = mb_substr($str, $start, $len);
|
||||
} else {
|
||||
$cutted_str = substr($start, $len);
|
||||
}
|
||||
|
||||
return $cutted_str;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user