2016-01-28 46 views
1

我有一個簡單但煩人的問題。我有下面的文字,例如以下SKLabelNode:將雙引號倒在雙引號內難嗎?

Label.text = "click on bob the button" 

但我想這樣做是這樣的:

Label.text = "click on "bob" the button" 

但它不會讓我把雙引號內的雙引號。任何方式在這個?

+4

看看這裏:http://stackoverflow.com/questions/30167848/how-to-print-double- quotes-inside/30167900#30167900它被稱爲「轉義」雙引號(不是雙逗號)。 :) – Moritz

+0

謝謝!我在網上查找,但無法找到正確的措辭來描述我的問題。乾杯! – Questions

+0

不客氣。 :) – Moritz

回答

2

你只需要通過之前加入\,像這樣花葶它:

Label.text = "click on \"bob\" the button"