1.string.replace(char oldChar, char newChar) 是对指定的字符替换 2.str.replaceAll(String regex, String repl)对匹配正则的字符替换。