LaravelBook\Laravel4Powerpack\Str::limitExact PHP Method

limitExact() public method

Returns "Taylor..." echo Str::limitExact('Taylor Otwell', 9); Limit the number of characters and append a custom ending echo Str::limitExact('Taylor Otwell', 9, '---');
public limitExact ( string $value, integer $limit = 100, string $end = '...' ) : string
$value string
$limit integer
$end string
return string
    public function limitExact($value, $limit = 100, $end = '...')
    {
        if ($this->length($value) <= $limit) {
            return $value;
        }
        return $this->limit($value, $limit - $this->length($end), $end);
    }