std.utf.display_clip

std.utf

display_clip(str, max_width) -> clipped

Clip a string to a maximum display width, preserving ANSI escape sequences