liveBook · Manning

Multiline string

A multiline string is a string literal or value whose text or source representation spans multiple lines.

How 3 Manning books explain it

Kotlin in Action, 2E

A triple-quoted string is a Kotlin string literal delimited by three quotation marks that preserves line breaks and does not interpret ordinary escape sequences.

How it is used
Embeds readable multiline content, regular expressions, paths, ASCII art, and expected test output.
How deep it goes
Explains delimiters, indentation cleanup, line endings, escape limitations, templates, and test usage without descending into compiler internals.
Examples
Uses path-matching patterns, ASCII art, Windows paths, HTML, JSON, and expected multiline test output.
What you can do after
Build readable Kotlin literals for multiline text, regular expressions, paths, and expected structured output.

Read how Kotlin in Action, 2E explains multiline string →

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond

A string literal form whose source text may span multiple lines, preserving line breaks and other whitespace in the literal text.

How it is used
Uses multiline template literals to make longer strings, especially product HTML, easier to read than concatenated strings.
How deep it goes
Defines multiline literals, distinguishes them from newline escapes, and demonstrates the resulting line break without exploring implementation internals.
Examples
Shows a two-line greeting and product HTML formatted across multiple lines.
What you can do after
Apply template literal syntax to write strings that span source lines, including readable HTML markup.

Read how Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond explains multiline string →

Get Programming: Learn to code with Python

How it is used
Uses triple-quoted strings to store multiline word data and write function documentation.
How deep it goes
Explains delimiters and embedded line breaks, then shows newline-based parsing and docstring structure.
Examples
Shows an art-word list, newline scanning, and a function docstring as concrete multiline-string examples.
What you can do after
Apply triple quotes to store multiline data or document a function with a readable docstring.

Read how Get Programming: Learn to code with Python explains multiline string →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.