Figurecore-escapes
\n | line feed (U+000A) |
\r | carriage return (U+000D) |
\t | horizontal tab (U+0009) |
\" | " |
\' | ' |
\\ | \ |
\u{} | the character with code point , read in hexadecimal |
Referred to from
Tests (7)
- elm / AstralCharLiteralTestA `Char` literal above U+FFFF has its full code point: `'\u{1F600}'` is 128512, and is the same character as `'馃榾'` written directly.
- elm / CharAstralRecordFieldTestAn astral `Char` (code point above 0xFFFF) in a record field keeps its code point, next to an `Int` field and after a record update, and a record holding one is equal to a record literal with the same fields.
- elm / CharLiteralSurrogateEscapeTest`'\u{D800}'` is not a Char literal: a surrogate code point is not a character.
- elm / CharUnicodeTest`Char.toCode` of non-ASCII character literals written as `\u{...}` escapes gives their code points: 955 for U+03BB and 8364 for U+20AC.
- elm / ParseErrorStringEscapeTooFewDigitsTestA Unicode escape in a string with only two hex digits, `"\u{41}"`, is rejected with a BAD UNICODE ESCAPE syntax error.
- elm / ParseErrorStringEscapeUnclosedTestA Unicode escape in a string with no closing brace, `"\u{12"`, is rejected with a BAD UNICODE ESCAPE syntax error.
- elm / StandardA8SurrogateEscapeTest`\u{D800}` is not an escape sequence: a surrogate code point is not a character.
Discussions
Discuss this figure路Search the discussions on GitHub
Discussions are on GitHub; one about this figure has [fig:core-escapes] in its title.
A Standard Definition of Elm? (Draft version 0.4) 漏 Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.