java替换字符串中的指定字符串指定大小写忽略
1、在你的项目中引入hutool的jar包

2、定义一个String类型的字符串和searchStr被查找的字符串

3、replacement 被替换的字符串和ignoreCase 是否忽略大小写

4、String s = StrUtil.replace(str1,sear罕铞泱殳chStr,replacement,ignoreCase);//替换字符串中的指定字符串

5、运行程序查看结果

1、在你的项目中引入hutool的jar包
2、定义一个String类型的字符串和searchStr被查找的字符串
3、replacement 被替换的字符串和ignoreCase 是否忽略大小写
4、String s = StrUtil.replace(str1,sear罕铞泱殳chStr,replacement,ignoreCase);//替换字符串中的指定字符串
5、运行程序查看结果