indentString
Indents each line in the provided string.
- Use
String.prototype.replace()and a regular expression to add the character specified byindentcounttimes at the start of each line. - Omit the third argument,
indent, to use a default indentation character of' '.