Escape sequences Flashcards
(15 cards)
\
Put a backslash in a string
\’
Put a single quote in a string
\”
Put a double quote in a string
\a
ascii bell when its output to the command line you hear a sound
\b
ascii backspace deletes the character immediately before it
\f
ascii formfeed drops the output on to the next new line with an indent equal to where it would have been on the previous line
\n
ascii linefeed creates a new line in a string
\N{name}
Character called name in Unicode database- allows us to use non-standard characters
\r
Carriage return- here the characters after the escape sequence replace the text at the start of the string
\t
Horizontal tab adds 8 spaces in a string
\uxxxx
The character with 16-bit hex value xxxx
\Uxxxxxxxx
Character with 32-bit hex value xxxxxxxx
\v
ASCII vertical tab- does the same as \f and moves us on to the line underneath our text
\ooo
Character with octal value ooo
\xhh
Character with hex value hh