Skip to content

Instantly share code, notes, and snippets.

@jasonroelofs
Created August 6, 2009 18:15
Show Gist options
  • Save jasonroelofs/163473 to your computer and use it in GitHub Desktop.
Save jasonroelofs/163473 to your computer and use it in GitHub Desktop.
str1 = "this is a pretty \
cool way of going about \
makeing really long
\
and neat strings \
yo"
str2 =<<-END
And this way you
dont' need a slash
at the end of
the line
END
str3 = "but if you use " +
" plus instead, you need to make sure" +
"you put the whitespace in\n"
str4 = "this is a pretty
cool way of going about
makeing really long
and neat strings
yo"
str5 = "but if you use " \
" plus instead, you need to make sure" \
"you put the whitespace in\n"
puts str1, ""
puts str2, ""
puts str3, ""
puts str4, ""
puts str5, ""
this is a pretty cool way of going about makeing really long
and neat strings
yo
And this way you
dont' need a slash
at the end of
the line
but if you use plus instead, you need to make sureyou put the whitespace in
this is a pretty
cool way of going about
makeing really long
and neat strings
yo
but if you use plus instead, you need to make sureyou put the whitespace in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment