public static function extract($string, $offset, $length = null) {
        if ($length) {
            return mb_substr($string, $offset, $length);
        }

        return mb_substr($string, $offset);
    }
public static function extract($string, $offset, $length = null) {
        if ($length) {
            return mb_substr($string, $offset, $length);
        }

        return mb_substr($string, $offset);
    }
public static function extract ( $ string , $ offset , $ length = null ) { if ( $ length ) { return mb_substr ( $ string , $ offset , $ length ) ; } return mb_substr ( $ string , $ offset ) ; }
Extracts a portion of a string.

@param string $string
@param int $offset
@param int $length
@return string
Extracts a portion of a string .