Rune Type
Rune represents a single Unicode character, capable of representing all characters in the Unicode character set, including Chinese characters, emojis, and more. Character literals start with r, followed by the character enclosed in single or double quotes.
Character literals have three forms: single character (e.g., r'A'), escape character (e.g., r'\n' for newline, r'\t' for tab, r'\\' for backslash), and universal character (starting with \u followed by 1-8 hexadecimal digits in curly braces). Rune can be converted to and from UInt32 to get or construct the Unicode code point of a character.
The code on the right demonstrates various character literals. The universal character \u{4f60} represents the character "你" (Chinese for "you") with Unicode code point U+4F60. Try constructing some emoji code points yourself, such as \u{1F600} which is the smiling face 😀.