Laravel 8 Str::replaceLast() {#collection-method}
2021-07-19 10:28 更新
Str::replaceLast
函数替换字符串中最后一次出现的给定值:
use Illuminate\Support\Str;
$replaced = Str::replaceLast('the', 'a', 'the quick brown fox jumps over the lazy dog');
// the quick brown fox jumps over a lazy dog
以上内容是否对您有帮助:
更多建议: