forked from Mirror/wren
clarify the list of escapes to show the whole list
This commit is contained in:
@ -74,6 +74,17 @@ A handful of escape characters are supported:
|
|||||||
"\r" // Carriage return.
|
"\r" // Carriage return.
|
||||||
"\t" // Tab.
|
"\t" // Tab.
|
||||||
"\v" // Vertical tab.
|
"\v" // Vertical tab.
|
||||||
|
|
||||||
|
|
||||||
|
"\x48" // Unencoded byte (2 hex digits)
|
||||||
|
"\u0041" // Unicode code point (4 hex digits)
|
||||||
|
"\U0001F64A" // Unicode code point (8 hex digits)
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
A `\x` followed by two hex digits specifies a single unencoded byte:
|
||||||
|
|
||||||
|
<pre class="snippet">
|
||||||
|
System.print("\x48\x69\x2e") //> Hi.
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
A `\u` followed by four hex digits can be used to specify a Unicode code point:
|
A `\u` followed by four hex digits can be used to specify a Unicode code point:
|
||||||
@ -89,12 +100,6 @@ of the basic multilingual plane, like all-important emoji:
|
|||||||
System.print("\U0001F64A\U0001F680") //> 🙊🚀
|
System.print("\U0001F64A\U0001F680") //> 🙊🚀
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
A `\x` followed by two hex digits specifies a single unencoded byte:
|
|
||||||
|
|
||||||
<pre class="snippet">
|
|
||||||
System.print("\x48\x69\x2e") //> Hi.
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
Strings are instances of class [String][].
|
Strings are instances of class [String][].
|
||||||
|
|
||||||
[string]: modules/core/string.html
|
[string]: modules/core/string.html
|
||||||
|
|||||||
Reference in New Issue
Block a user