Dcrypt\Str::substr PHP Method

substr() public static method

Returns part of a string.
public static substr ( string $string, integer $start, integer $length = null ) : string
$string string The string whose length we wish to obtain
$start integer
$length integer
return string the extracted part of string; or FALSE on failure, or an empty string.
    public static function substr($string, $start, $length = null)
    {
        if (\function_exists('mb_substr')) {
            // Fix a weird quirk in PHP versions prior to 5.4.8
            if ($length === null && \version_compare('5.4.8', PHP_VERSION)) {
                $length = self::strlen($string);
            }
            return \mb_substr($string, $start, $length, '8bit');
        }
        return \substr($string, $start, $length);
        // @codeCoverageIgnore
    }