Lawtext core references / core/src/util/term
Module: core/src/util/term
Table of contents
Enumerations
Classes
Functions
Functions
toTableText
▸ toTableText(table
, width
): string
Parameters
Name | Type |
---|---|
table | string [][] |
width | number |
Returns
string
Defined in
core/src/util/term.ts:82 (opens in a new tab)
widthWOColor
▸ widthWOColor(text
): number
Parameters
Name | Type |
---|---|
text | string |
Returns
number
Defined in
core/src/util/term.ts:77 (opens in a new tab)
withEllipsis
▸ withEllipsis(text
, maxLength
): string
Parameters
Name | Type |
---|---|
text | string |
maxLength | number |
Returns
string
Defined in
core/src/util/term.ts:113 (opens in a new tab)
wrap
▸ wrap(row
, width
): IterableIterator
<string
[]>
Parameters
Name | Type |
---|---|
row | string [] |
width | number |
Returns
IterableIterator
<string
[]>
Defined in
core/src/util/term.ts:68 (opens in a new tab)
wrapSingle
▸ wrapSingle(s
, width
, afterFirstLineIndent?
): IterableIterator
<string
>
Parameters
Name | Type | Default value |
---|---|---|
s | string | undefined |
width | number | undefined |
afterFirstLineIndent | number | 0 |
Returns
IterableIterator
<string
>