Created
March 16, 2012 20:35
-
-
Save mkoby/2052497 to your computer and use it in GitHub Desktop.
Intro to Ruby - 02 - The String Addendum
This file contains hidden or 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
| # Double Quotes | |
| double_quotes = "Here be double quotes" | |
| # Single Quotes | |
| single_quotes = 'Here be single quotes' | |
| # Intermixing Quotes | |
| 'Sam said, "Never give up, never surrender"' | |
| "Sam told me to read the book, 'Brave New World'" | |
| # Single Quotes can't do contractions | |
| "single quotes can't do contractions" | |
| #Escaping Quotes | |
| "I just got back from seeing the movie, \"Back to the Future\"" # notice the \" for double quotes, use \' for single quotes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment