Str::words

Posted on November 25, 2016

Limit the number of words in a string.

Example usage

$value = Str::words('Lolita just fucking awesome framework');

// Lolita just fucking awesome framework

$value
= Str::words('Lolita just fucking awesome framework', 3);
// Lolita just fucking...

$value
= Str::words('Lolita just fucking awesome framework', 2, '###');
// Lolita just###

Parameters

string $value

int $words

string $end

Return Value

string

0 Comments

Leave a Reply

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