escape ( escape -- ch )


Vocabulary
strings.parser

Inputs
escapea single-character escape


Outputs
cha character


Word description
Converts from a single-character escape code and the corresponding character.

Examples
USING: kernel prettyprint strings.parser ; CHAR: n escape CHAR: \n = .
t


Definition


: escape ( escape -- ch )
H{
{ 32 32 }
{ 97 7 }
{ 98 8 }
{ 34 34 }
{ 101 27 }
{ 102 12 }
{ 110 10 }
{ 48 0 }
{ 114 13 }
{ 115 32 }
{ 116 9 }
{ 118 11 }
{ 92 92 }
} ?at [ bad-escape ] unless ;