OptionalellipsisOptionalescapeFunction to escape the input string. The escaping is performed after line breaking, with the intent that in the final display, those escapes will be replaced appropriately. Defaults to an identity transform.
OptionalfirstIf indentFirst is false, how many columns was the first line already indented? If NaN, use the indent width, in display cells. If indentFirst is true, this is ignored.
OptionalhyphenString to use when long word is split to next line with LineWrap.OVERFLOW_ANYWHERE.
OptionalincludeIf true, include ANSI escape sequences in the width of the string. If false, strips ANSI before calculating width.
OptionalindentIf a string, indent every line with that
string. If a number, insert that many indentChars at the
beginning of each line. Defaults to "" (the empty string).
OptionalindentIf indent is a number, use that
many of this string to indent. Defaults to " " (a single space).
OptionalindentIf the input string is empty, should we still indent?
OptionalindentIndent the first line? If not, treat the first line as if it was already indented, giving a short first line.
OptionalisIf specified, override CJK detection by locale.
OptionalisRegular expression that finds
newlines for replacement with newlineReplacement. Ensure you do not
create a regular expression denial of service
(ReDoS)
attack. Make sure the expression has the g modifier.
OptionallocaleWhich locale to use when splitting by graphemes? Defaults to current locale of system, as calculated by the JS runtime.
OptionalnewlineString to insert at the end of every line, including the last one.
OptionalnewlineFor every newline found with
isNewline, insert this string. Defaults to " " (single space).
OptionaloverflowWhat to do with words that are longer than the line width?
OptionalverboseTurn on verbose logging for debugging purposes.
OptionalwidthMaximum number of graphemes per line, including indentation.
String to use when long word is truncated with LineWrap.OVERFLOW_CLIP.