Trim newlines from the start and/or end of a string
MIT License
Strip a substring from the start/end of a string
Strip leading whitespace from each line in a string
Strip redundant indentation and indent the string
Get the visual width of the widest line in a string - the number of columns required to display it
Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz
Remove leading, trailing and repeated whitespace from a string
Strip the final newline character from a string/buffer
Get the visual width of a string - the number of columns required to display it
Prepend `<br>` to newlines in a string
Truncate a string to a specific width in the terminal
Detect the dominant newline character of a string
Indent each line in a string
Normalize the newline characters in a string to `\n`
Split lines into an array of lines