Prefixes each line in the given string with the given prefix.
const text = `Line 1Line 2Line 3`;const prefixed = prefixLines(text, '> ');console.log(prefixed); Copy
const text = `Line 1Line 2Line 3`;const prefixed = prefixLines(text, '> ');console.log(prefixed);
This will output:
> Line 1 > Line 2 > Line 3 Copy
> Line 1 > Line 2 > Line 3
Prefixes each line in the given string with the given prefix.