例如,需要这个文本来写一个文件:
This is some simple text "it's quote", test test
我使用writeFile :: FilePath -> String -> IO ()来写文件,但是当我尝试在文件中写入这个字符串时,我在文件中看到:
This is some simple text \"it\'s quote\", test test
我如何删除\ symbols,我只需要在我的文本文件中“没有\”。
谢谢。
发布于 2012-05-26 21:17:36
通过show函数将报价添加到String类型。如果你只是直接写字符串,它将不会被转义。
https://stackoverflow.com/questions/10764106
复制相似问题