Skip to content

wakterm.truncate_right(string, max_width)

Since: Version 20210502-130208-bff6815d

The functionality described in this section requires version 20210502-130208-bff6815d of wakterm, or a more recent version.

Returns a copy of string that is no longer than max_width columns (as measured by wakterm.column_width).

Truncation occurs by reemoving excess characters from the right end of the string.

For example, wakterm.truncate_right("hello", 3) returns "hel",

See also: wakterm.truncate_left, wakterm.pad_left.