Skip to main content

width

Function width 

Source
pub fn width() -> usize
Expand description

Returns the terminal width in columns, or 80 as fallback.

Uses TIOCGWINSZ ioctl on Unix and GetConsoleScreenBufferInfo on Windows. Returns 80 when output is piped or size cannot be determined.