Laravel 8 Str::words() {#collection-method}
Str::words
方法用于限制字符串中的单词数:
use Illuminate\Support\Str;
return Str::words('Perfectly balanced, as all things should be.', 3, ' >>>');
// Perfectly balanced, as >>>
Str::words
方法用于限制字符串中的单词数:
use Illuminate\Support\Str;
return Str::words('Perfectly balanced, as all things should be.', 3, ' >>>');
// Perfectly balanced, as >>>