0 votes
in Ruby by
How to write multiline string in Ruby.

1 Answer

0 votes
by

Writing multiline string is very simple in Ruby language. We will show three ways to print multiline string.

  • String can be written within double quotes.
  • The % character is used and string is enclosed within / character.
  • In heredoc syntax, we use << and string is enclosed within word STRING.
...