public function left($text, $length)
    {
        if (!$this->isValidLength($text, $length)) return $text;
        return \substr($text, 0, $length);
    }
public function left($text, $length)
    {
        if (!$this->isValidLength($text, $length)) return $text;
        return \substr($text, 0, $length);
    }
public function left ( $ text , $ length ) { if ( ! $ this -> isValidLength ( $ text , $ length ) ) return $ text ; return \ substr ( $ text , 0 , $ length ) ; }
Returns the left part of a string according the given length

@param  string $text
@param  int    $length
@return string
Returns the left part of a string according the given length