public static function substring($string = false, $firstIndex = 0, $maxStringLength = false) {

        if ($string) {

            if (!$maxStringLength) {

                $maxStringLength = (self::length($string) - $firstIndex);
            }

            return substr($string, $firstIndex, $maxStringLength);
        }

        return false;
    }
public static function substring($string = false, $firstIndex = 0, $maxStringLength = false) {

        if ($string) {

            if (!$maxStringLength) {

                $maxStringLength = (self::length($string) - $firstIndex);
            }

            return substr($string, $firstIndex, $maxStringLength);
        }

        return false;
    }
public static function substring ( $ string = false , $ firstIndex = 0 , $ maxStringLength = false ) { if ( $ string ) { if ( ! $ maxStringLength ) { $ maxStringLength = ( self :: length ( $ string ) - $ firstIndex ) ; } return substr ( $ string , $ firstIndex , $ maxStringLength ) ; } return false ; }
Get substring.
@param string full string
@param int first index (starting point)
@param int max string length
@return string substring
Get substring .