Next: , Up: Strings


5.5.5.1 String Read Syntax

The read syntax for strings is an arbitrarily long sequence of characters enclosed in double quotes (").

Backslash is an escape character and can be used to insert the following special characters. \" and \\ are R5RS standard, the rest are Guile extensions, notice they follow C string syntax.

\\
Backslash character.
\"
Double quote character (an unescaped " is otherwise the end of the string).
\0
NUL character (ASCII 0).
\a
Bell character (ASCII 7).
\f
Formfeed character (ASCII 12).
\n
Newline character (ASCII 10).
\r
Carriage return character (ASCII 13).
\t
Tab character (ASCII 9).
\v
Vertical tab character (ASCII 11).
\xHH
Character code given by two hexadecimal digits. For example \x7f for an ASCII DEL (127).

The following are examples of string literals:

     "foo"
     "bar plonk"
     "Hello World"
     "\"Hi\", he said."