阅读(3401)
赞(7)
Laravel 8 split {#collection-method}
2021-07-05 09:43:53 更新
split
方法使用正则表达式将字符串分割到集合中:
use IlluminateSupportStr;
$segments = Str::of('one, two, three')->split('/[s,]+/');
// collect(["one", "two", "three"])
split
方法使用正则表达式将字符串分割到集合中:
use IlluminateSupportStr;
$segments = Str::of('one, two, three')->split('/[s,]+/');
// collect(["one", "two", "three"])
Copyright©2023 字节宝| |
违法和不良信息举报电话:|举报邮箱:2283035678@qq.com