replace 声明一个字符串 并替换字符串中某一字符 1 str = "xxx"; 2 3 str = str.replace("-","") str.replace ("a",""b) 其中a 是插入字符,b是删掉的字符 未完,待续......