function df_parseCamelCase($Field) { $name = ''; for ($i = 0; $i < strlen($Field); $i++) { $Char = substr($Field, $i, 1); if (is_uppercase($Char) && $i > 0 && strlen($Field) > 1 && (!is_uppercase(substr($Field, $i + 1, 1)) && (substr($Field, $i + 1, 1) != '' && substr($Field, $i + 1, 1) != ' ') && (substr($Field, $i - 1, 1) != '-' && substr($Field, $i - 1, 1) != ' '))) { $name .= ' '; } $name .= str_replace('_', ' ', str_replace('_ ', ' ', $Char)); } return trim($name); }
function is_ucfirst($string = '') { $first_char = custom_substr($string, 0, 1); $is_ucfirst = is_uppercase($first_char); return $is_ucfirst; }