public static function lcfirst($str, $use_enc = null)
{
$enc = self::$hab_enc;
if ($use_enc !== null) {
$enc = $use_enc;
}
if (self::$use_library == self::USE_MBSTRING) {
// get the first character
$first = self::substr($str, 0, 1, $enc);
// lowercase it
$first = self::strtolower($first, $enc);
// get the rest of the characters
$last = self::substr($str, 1, null, $enc);
// put them back together
$ret = $first . $last;
} else {
// lcfirst() is php 5.3+ so we'll emulate it
$first = substr($str, 0, 1);
$first = strtolower($first);
$last = substr($str, 1);
$ret = $first . $last;
}
return $ret;
}