写作,其中包含"的字符串; " [英] Writing a string which contains " "
本文介绍了写作,其中包含"的字符串; "的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从XML文档的字符串:
I have a string from an xml document:
<title type="html">
有我写这个字符串像这样<标题键入=HTML>中
?我已经编写JavaScript作为一个字符串类似的问题,但我确实看到在过去的一些解决方案(我记不清了)?
Is there a way for me to write this string like "<title type="html">"
? I've had similar problems writing javascript as a string but I did see some solutions in the past (which I can't remember)?
感谢
推荐答案
您可以逃脱使用\
String s = "this is my \"data\" in the string";
这篇关于写作,其中包含"的字符串; "的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文