About the escape character

You can use the backslash escape character (\), to define other characters in string literals.

Escape sequence

Description

\b

The backspace character.

\f

The form feed character.

\n

The newline character.

\r

The carriage return.

\t

The tab character.

\unnnn

The Unicode character with the character code specified by the hexadecimal number nnnn. For example, \u263a is the smile character.

\xnn

The ASCII character with the character code specified by the hexadecimal number nn.

\'

A single quotation mark.

\"

A double quotation mark.

\\

A single backslash character.

For more information on string literals, see About literals and Creating strings.