Skip to content

prefixLines

prefixLines(text, prefix, options?): string[]

Defined in: packages/core/src/string/prefix-lines.ts:22

Prefix each line of the given text with the given prefix.

If the text is an array of strings, each string will be resplit into lines (if necessary).

string | string[]

The text to prefix

string

The prefix to add to each line

PrefixLinesOptions

Options for prefixing lines

string[]

The prefixed text