sliceToMaxWidth
sliceToMaxWidth(
text,maxWidth):string
Defined in: packages/core/src/utils/displayWidth.ts:230
sliceToWidth measured by maxDisplayWidth — the head that fits the budget on any terminal, whatever it does with Ambiguous characters. The cut for a budget that must hold rather than merely look right.
Parameters
Section titled “Parameters”string
maxWidth
Section titled “maxWidth”number
Returns
Section titled “Returns”string