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 function limitExact($value, $limit = 100, $end = '...') { if ($this->length($value) <= $limit) { return $value; } return $this->limit($value, $limit - $this->length($end), $end); }