Str::limit

Posted on November 25, 2016

The Str::limit function limits the number of characters in a string. The function accepts a string as its first argument and the maximum number of resulting characters as its second argument.

Example usage

$value = Str::limit('The PHP framework for web.', 7);
// The PHP...

$value = Str::limit('Lolita Framework is really awesome');
// Lolita is really awesome

$value = Str::limit('Lolita Framework is really awesome', 6, '!!!');
// Lolita!!!

Parameters

string $value

int $limit

string $end

Return Value

string

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *