String Escape Characters

Unqualified string literals support the following escape sequences:

Escape sequence

Meaning

\\

\

\'

Single quote (')

\"

Double quote (")

\a

ASCII bell (BEL)

\b

ASCII Backspace (BS)

\f

ASCII Formfeed (FF)

\n

ASCII Linefeed (LF)

\r

ASCII Carriage Return (CR)

\t

ASCII Horizontal Tab (TAB)

\uxxxx

16-bit hex Unicode character (encoded in Unicode or UTF8 depending upon string type)

\Uxxxxxxxx

32-bit hex Unicode character (encoded in Unicode or UTF8 depending upon string type)

\v

ASCII Vertical Tab (VT)

\ooo

Character with octal value ooo (1-3 octal digits)

\xhh

Character with hex value hh (1-2 hex digits)

Was this page helpful? Yes No Submitting... Thank you

Comments