Logo

Programming-Idioms

History of Idiom 48 > diff from v26 to v27

Edit summary for version 27 by programming-idioms.org:
[Elixir] 2 ways => 2 impls => new impl 1907

Version 26

2016-11-21, 23:16:13

Version 27

2016-11-21, 23:17:21

Idiom #48 Multi-line string literal

Assign to variable s a string literal consisting in several lines of text

Idiom #48 Multi-line string literal

Assign to variable s a string literal consisting in several lines of text

Extra Keywords
multiline raw
Extra Keywords
multiline raw
Code
s = "Spanning
string
works"

# you can also use heredocs

s = """
multiline
heredoc
"""
Code
s = "Spanning
string
works"
Comments bubble
triple-quotes starts a heredoc.
Demo URL
http://elixirplayground.com?gist=1dd0cf297f10e2b189ae
Demo URL
http://elixirplayground.com?gist=04bf2e6d36081c357220b7e6fc374119