truncate_left

On this page
  1. wakterm.truncate_left(string, max_width)

wakterm.truncate_left(string, max_width)#

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

Truncation occurs by removing excess characters from the left end of the string.

For example, wakterm.truncate_left("hello", 3) returns "llo".

See also: wakterm.truncate_right, wakterm.pad_right.

Edit this page