在ActionScript之间单双差引号的字符串 [英] Difference Between Single and Double Quoted Strings in ActionScript
本文介绍了在ActionScript之间单双差引号的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有在ActionScript单,双引号字符串之间有什么区别?
Is there any difference between single and double quoted strings in ActionScript?
推荐答案
您可以使用作为分隔符的字符串。然而,它们不能互换,即你不能启动一个字符串的撇号和一个带引号结束。
You can use either as delimiter for a string. They are however not interchangeable, i.e. you can't start a string with an apostrophe and end it with a quotation mark.
的唯一差别是需要转义的字符。里面用引号分隔字符串标志着你需要逃避引号,但没有撇号,反之亦然。
The only difference is which characters you need to escape. Inside a string delimited by quotation marks you need to escape quotation marks but not apostrophes, and vice versa.
把文本他说:没关系,笑了起来
在字符串中,你可以使用:
To put the text He said "It's all right" and laughed.
in a string you can use:
"He said \"It's all right\" and laughed."
或
'He said "It\'s all right" and laughed.'
这篇关于在ActionScript之间单双差引号的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文