Laravel 8 isAscii {#collection-method}
isAscii
方法用于判断指定字符串是否是 ASCII 字符串:
use Illuminate\Support\Str;
$result = Str::of('Taylor')->isAscii();
// true
$result = Str::of('ü')->isAscii();
// false
isAscii
方法用于判断指定字符串是否是 ASCII 字符串:
use Illuminate\Support\Str;
$result = Str::of('Taylor')->isAscii();
// true
$result = Str::of('ü')->isAscii();
// false