阅读(3960) (6)

Laravel 8 Str::is() {#collection-method}

2021-07-03 16:54:17 更新

Str::is 方法用来判断字符串是否与指定模式匹配。星号 * 可用于表示通配符:

use IlluminateSupportStr;

$matches = Str::is('foo*', 'foobar');

// true

$matches = Str::is('baz*', 'foobar');

// false