Account for the fact that mb_strtolower is not always available.

This commit is contained in:
Mark Crane
2015-06-01 04:54:21 +00:00
parent f4a360eb23
commit 57ceca4590
3 changed files with 22 additions and 3 deletions
+19
View File
@@ -1293,4 +1293,23 @@ function number_pad($number,$n) {
}
}
//lower case
function lower_case($string) {
if (function_exists('mb_strtolower')) {
return mb_strtolower($string, 'UTF-8');
}
else {
return strtolower($string);
}
}
//upper case
function upper_case($string) {
if (function_exists('mb_strtoupper')) {
return mb_strtoupper($string, 'UTF-8');
}
else {
return strtoupper($string);
}
}
?>