public static function delimit($string, $delimiter = '_')
    {
        $cacheKey = __FUNCTION__ . $delimiter;

        $result = static::_cache($cacheKey, $string);

        if ($result === false) {
            $result = mb_strtolower(preg_replace('/(?<=\\w)([A-Z])/', $delimiter . '\\1', $string));
            static::_cache($cacheKey, $string, $result);
        }

        return $result;
    }
public static function delimit($string, $delimiter = '_')
    {
        $cacheKey = __FUNCTION__ . $delimiter;

        $result = static::_cache($cacheKey, $string);

        if ($result === false) {
            $result = mb_strtolower(preg_replace('/(?<=\\w)([A-Z])/', $delimiter . '\\1', $string));
            static::_cache($cacheKey, $string, $result);
        }

        return $result;
    }
public static function delimit ( $ string , $ delimiter = '_' ) { $ cacheKey = __FUNCTION__ . $ delimiter ; $ result = static :: _cache ( $ cacheKey , $ string ) ; if ( $ result === false ) { $ result = mb_strtolower ( preg_replace ( '/(?<=\\w)([A-Z])/' , $ delimiter . '\\1' , $ string ) ) ; static :: _cache ( $ cacheKey , $ string , $ result ) ; } return $ result ; }
Expects a CamelCasedInputString, and produces a lower_case_delimited_string

@param string $string String to delimit
@param string $delimiter the character to use as a delimiter
@return string delimited string
Expects a CamelCasedInputString and produces a lower_case_delimited_string