Skip to main content Module theme Copy item path Source color_jitter Returns the value formatted and ANSI-colored for jitter (ms). color_loss Returns the value formatted and ANSI-colored for packet loss (%). color_ping Returns the value formatted and ANSI-colored for ping (ms). color_speed Returns the value formatted and ANSI-colored for speed (Mbps). pad_to Right-pads s with spaces so its visible width equals width.
If the visible length already meets or exceeds width, returns s unchanged. speed_rating Returns a short rating label for a given Mbps value. truncate_to Truncates a string to a max length, appending an ellipsis if truncated. visible_len Returns the visible (printed) length of a string by stripping ANSI codes first.
Uses console::measure_text_width which correctly handles multi-column Unicode characters.