Questions Concepts
GitHub icon

Multiline Strings

Multiline Strings - language feature

< >
Example from JavaScript, TypeScript:
const lines = `one two`
Example from Python, Cython:
template = """This is the first line. This is the second line. This is the third line."""
Example from PHP:
$xml = <<<XML l vv XML;
Example from Elixir:
template = """ This is the first line. This is the second line. This is the third line. """
Example from C3:
String s = `this string is multiline`;
Example from Speedie:
"hello you beauty"
Example from Ion:
( '''hello ''' // Sexp with one element '''world!''' ) ("hello world!") // The exact same sexp value // This Ion value is a string containing three newlines. The serialized // form's first newline is escaped into nothingness. '''\ The first line of the string. This is the second line of the string, and this is the third line. '''
Example from Jule:
`Multiline strings is available in Jule with raw strings`
Example from Boron:
{{ Line 1 Line 2 }}

Languages with Multiline Strings include JavaScript, Python, PHP, Ruby, TypeScript, Elixir, Cython, C3, Speedie, Ion, progsbase, Jule, Boron

Languages without Multiline Strings include JSON, JSON5, JSONiq, JSON with Comments, Superjson, Jsonnet, Hocon

This question asks: Does the language support multiline strings?

HTML of this page generated by Features.ts

View source

- Build the next great programming language Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Traffic Traffic Today Day 305 Logout