I have a string like so string1:
Hello World, join my game:
I would like to make string1 become:
Hello World, join my game:
http://game.com/url
How can I append a carriage return with ruby and then a link from another variable?
THanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It really depends on what you are outputting to.
$STDOUT:
or
or
If you are outputting this in an
html.erbor.rhtmldocument:If you already have a string like
string1then you can append to it using either+=or<<:or: