What does \\u003C mean?

匿名 (未验证) 提交于 2019-12-03 02:49:01

问题:

I'm looking at twitter's javascript file, and I see this in the templates hash:

Browse Interests{{/i}}\u003C/a\u003E\n        \u003C/li\u003E\n  {{#logged_in}}\n

What do those codes represent?

回答1:

It's a unicode character. In this case \u003C and \u003E mean :

U+003C < Less-than sign

U+003E > Greater-than sign

See a list here



回答2:

That is a unicode character code that, when parsed by JavaScript as a string, is converted into its corresponding character (JavaScript automatically converts any occurrences of \uXXXX into the corresponding Unicode character). For example, your example would be:

Browse Interests{{/i}}</a>\n        </li>\n  {{#logged_in}}\n

As you can see, \u003C changes into < (less-than sign) and \u003E changes into > (greater-than sign).

In addition to the link posted by Raynos, this page from the Unicode website lists a lot of characters (so many that they decided to annoyingly group them) and this page has a (kind of) nice index.



回答3:

It is a unicode char \u003C = <



回答4:

Those are unicode escapes. The general unicode escapes looks like \uxxxx where xxxx are the hexadecimal digits of the ASCI characters. They are used mainly to insert special characters inside a javascript string.



转载请标明出处:What does \\u003C mean?
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!