mirror of
https://github.com/irmen/prog8.git
synced 2025-01-12 04:30:03 +00:00
added \' escape character
This commit is contained in:
parent
4a9956c4a4
commit
1c8e4dba73
@ -675,6 +675,7 @@ internal fun unescape(str: String, position: Position): String {
|
||||
'n' -> '\n'
|
||||
'r' -> '\r'
|
||||
'"' -> '"'
|
||||
'\'' -> '\''
|
||||
'u' -> {
|
||||
"${iter.nextChar()}${iter.nextChar()}${iter.nextChar()}${iter.nextChar()}".toInt(16).toChar()
|
||||
}
|
||||
|
@ -415,6 +415,7 @@ There are several escape sequences available to put special characters into your
|
||||
- ``\n`` - newline character (move cursor down and to beginning of next line)
|
||||
- ``\r`` - carriage return character (more or less the same as newline if printing to the screen)
|
||||
- ``\"`` - quote character (otherwise it would terminate the string)
|
||||
- ``\'`` - apostrophe character (has to be escaped in character literals, is okay inside a string)
|
||||
- ``\uHHHH`` - a unicode codepoint \u0000 - \uffff (16-bit hexadecimal)
|
||||
- ``\xHH`` - 8-bit hex value that will be copied verbatim *without encoding*
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user