From 9e86b0d26aefe0d02270aacdb9219c498ef043cb Mon Sep 17 00:00:00 2001 From: ruby0x1 Date: Thu, 8 Apr 2021 10:11:01 -0700 Subject: [PATCH] clarify the list of escapes to show the whole list --- doc/site/values.markdown | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/site/values.markdown b/doc/site/values.markdown index 5e11683f..5700f2dc 100644 --- a/doc/site/values.markdown +++ b/doc/site/values.markdown @@ -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) + + +A `\x` followed by two hex digits specifies a single unencoded byte: + +
+System.print("\x48\x69\x2e") //> Hi.
 
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") //> 🙊🚀 -A `\x` followed by two hex digits specifies a single unencoded byte: - -
-System.print("\x48\x69\x2e") //> Hi.
-
- Strings are instances of class [String][]. [string]: modules/core/string.html