如何在字符串中替换double-quotes
为?"e;
这是我尝试过的:
1.9.3-p362 :009 > a = "\"That's it\", she said."
=> "\"That's it\", she said."
1.9.3-p362 :010 > a.tr('"', ""e;")
=> "&That's it&, she said."
如您所见,而不是"es;
我只得到&
,知道吗?
如何在字符串中替换double-quotes
为?"e;
这是我尝试过的:
1.9.3-p362 :009 > a = "\"That's it\", she said."
=> "\"That's it\", she said."
1.9.3-p362 :010 > a.tr('"', ""e;")
=> "&That's it&, she said."
如您所见,而不是"es;
我只得到&
,知道吗?