std.txt.limit

std.txt

limit(str, max, prefix) -> result

Truncate a string to a maximum display width with ellipsis

Truncates to max display width, inserting an ellipsis at the cut point. When prefix < max, shows a prefix portion, ellipsis, and suffix portion of the original string.