src/Strings/Strings.php
public function substr($start = 0, $length = null)
    {
        $function = static::$functions[(int) static::$useMbstring]['substr'];

        return new self($function($this->string, $start, $length));
    }
public function substr($start = 0, $length = null)
    {
        $function = static::$functions[(int) static::$useMbstring]['substr'];

        return new self($function($this->string, $start, $length));
    }
public function substr ( $ start = 0 , $ length = null ) { $ function = static :: $ functions [ ( int ) static :: $ useMbstring ] [ 'substr' ] ; return new self ( $ function ( $ this -> string , $ start , $ length ) ) ; }
Substring function. Use mbstring extension if loaded.

@param  integer $start
@param  integer $length
@return Strings  Part of string.
Substring function . Use mbstring extension if loaded .