plus

Concatenates this and other.

>>> Document("hello") + "World"
helloWorld

operator fun PrettyPrintable.plus(other: String): Document

Convenience method that automatically converts other to a Document.

Allows the use of String literals when generating Documents. For example,

Document("hello") + Document("world")

can instead be written as

Document("hello") + "world"

Unfortunately, the first call to Document.invoke cannot be avoided.

See also