concat_with_nl: Concatenate strings as separate lines of text.

View source: R/text_formatting.R

concat_with_nlR Documentation

Concatenate strings as separate lines of text.

Description

Combine strings, as separate lines of text.

Usage

concat_with_nl(s, ..., start_par = FALSE, extra_lines = 0, collapse = "")

Arguments

s

A character string

...

Additional character strings

start_par

Put an extra newline between each pair of strings, so each string starts a new paragraph.

extra_lines

Number of extra newlines to append after each string.

collapse

Extra characters to insert between the strings.

Details

Take two or more lines of text. Make sure they each end with a newline and then concatenate them.

Value

A character string.

Examples

concat_with_nl("foo", "bar")
concat_with_nl("foo", "bar", start_par = TRUE)
concat_with_nl("foo", "bar", collapse = "...")


jonathan-g/semestr documentation built on Jan. 23, 2025, 3:10 p.m.