字符串替换(replace,replaceAll) 你的名字 2022-05-12 14:18 248阅读 0赞 replace:只替换第一个 replaceAll:支持正则进行替换 投机取巧:字符串.replace("-").join(""); 详细用法参照这位仁兄写的,我把精华摘出来了。 [https://blog.csdn.net/qq\_27093465/article/details/53437411?utm\_source=blogxgwz0][https_blog.csdn.net_qq_27093465_article_details_53437411_utm_source_blogxgwz0] [https_blog.csdn.net_qq_27093465_article_details_53437411_utm_source_blogxgwz0]: https://blog.csdn.net/qq_27093465/article/details/53437411?utm_source=blogxgwz0
还没有评论,来说两句吧...