1
0
forked from Mirror/wren

clarify the list of escapes to show the whole list

This commit is contained in:
ruby0x1
2021-04-08 10:11:01 -07:00
parent e260b467c4
commit 9e86b0d26a

View File

@ -74,6 +74,17 @@ A handful of escape characters are supported:
"\r" // Carriage return.
"\t" // 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>
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") //> 🙊🚀
</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][].
[string]: modules/core/string.html