Optional
opts: LineWrapOptions = {}Static
DEFAULT_Static
OVERFLOW_Static
OVERFLOW_If a word is longer than the wrappable area, cut it to size, dropping the rest of the word, inserting an ellipsis at the end.
Static
OVERFLOW_If a word is longer than the wrappable area, allow the word to go extend past the width so that it is not broken. This is the only way for long URLs to still be clickable.
Did we determin that we are in a CJK context? Useful for testing.
The calculated locale. Useful for testing.
Yield a succession of lines that fit, as best as possible, into the possible width configured. Lines will not have newlines appended, but will be indented.
The input string
Optional
firstCol: number = NaNIf not NaN, use this column as the start in addition to the firstCol option (if it was non-NaN).
Yield a succession of lines that fit, as best as possible, into the possible width configured. Lines will not have newlines appended, but will be indented. Each line will yield a Part object.
The input string
Optional
firstCol: number = NaNIf not NaN, use this column as the start in addition to the firstCol option (if it was non-NaN).
Unwrap text using the isNewline and newlineReplacement options.
Wrap text, inserting a newline between each line. No newline added at the end.
If a word is longer than the wrappable area, split it into chunks that do fit, inserting a hyphen at the end of each line.