Update string.utils.php

This commit is contained in:
Namhyeon Go 2019-06-13 11:53:48 +09:00 committed by GitHub
parent 2cea5d54fa
commit 36d7628865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,6 +190,12 @@ if(!check_function_exists("get_highlighted_html_by_words")) {
}
}
if(!check_function_exists("get_floating_percentage")) {
function get_floating_percentage($x, $a=2) {
return round($x / 100, $a);
}
}
if(!check_function_exists("eregi_compatible")) {
function eregi_compatible($pattern, $subject, &$matches=NULL) {
return preg_match(sprintf("/%s/i", $pattern), $subject, $matches);