sources/lib/Inflector.php
public static function underscore($string = null)
    {
        if ($string === null) {
            return null;
        }

        return strtolower(preg_replace('/([A-Z])/', '_\1', lcfirst($string)));
    }
public static function underscore($string = null)
    {
        if ($string === null) {
            return null;
        }

        return strtolower(preg_replace('/([A-Z])/', '_\1', lcfirst($string)));
    }
public static function underscore ( $ string = null ) { if ( $ string === null ) { return null ; } return strtolower ( preg_replace ( '/([A-Z])/' , '_\1' , lcfirst ( $ string ) ) ) ; }
Underscore a string.

@param  string $string
@return string
Underscore a string .