第一种:split方法配合join方法
第二种:replace方法配合indexOf方法:
用某种符号或字符替换某些字符
原文:https://www.cnblogs.com/zhang-hong/p/13019747.html