替换单个 "(引号)

Replace single " (quotation mark)

如何替换 Java 中的 String 中的单引号 "?不是引号中的单词。

String s = someotherstring.replace("\"",""); // replace all occurrences of "

将其作为参数传递给 String#replace

示例:要用 x 替换任何 ",请使用:

 myString.replace('"', 'x');