java替换指定字符串的指定区间内字符为"*"
1、在项目中引入hutool的jar包

2、首先定义一个String类型的字符串

3、startInclude 开始位置(包含)
endExclude 结束位置(不包含)

4、String s = StrUtil.hide(str1,startInclude,endExclude);//替换指定字符串的指定区间内字符为"*"

5、运行程序后查看被隐藏后为结果

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:102
阅读量:95
阅读量:63
阅读量:131
阅读量:156