Created
August 31, 2016 16:23
-
-
Save okram999/654940891dff84364882535e12df8f87 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is all of the escape sequences Ruby supports. You may not use many of these, but memorize their format and what they do anyway. Try them out in some strings to see if you can make them work. | |
Escape What it does. | |
\\ Backslash () | |
\' 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 Character with 16-bit hex value xxxx (Unicode only) | |
\v ASCII vertical tab (VT) | |
\ooo Character with octal value ooo | |
\xhh Character with hex value hh | |
https://learnrubythehardway.org/book/ex10.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment