@tempots/std
wrapLine() function
Wraps a string into multiple lines based on the specified number of columns, indentation, and newline character.
Signature:
wrapLine: (s: string, columns: number, indent: string, newline: string) => string
Parameters
Parameter |
Type |
Description |
---|---|---|
s |
string |
The string to wrap. |
columns |
number |
The number of columns per line. |
indent |
string |
The indentation string to prepend to each line. |
newline |
string |
The newline character to use for line breaks. |
Returns: string
The wrapped string.