Skip to main content

Module text_budget

Module text_budget 

Source
Expand description

Clipping text to a byte budget without splitting a UTF-8 character.

Structs§

Clip
The result of clipping text to a byte cap.

Functions§

clip
Clip text so its UTF-8 length does not exceed cap bytes, trimming back to the nearest character boundary rather than splitting a multi-byte character.