Retrieve the terminal's size in rows and columns.
β¨ This package works on all targets!
gleam add term_sizeimport gleam/io
import gleam/string
import term_size
pub fn main() {
let assert Ok(columns) = term_size.columns()
string.repeat("-", columns)
|> io.println
}Further documentation can be found at https://hexdocs.pm/term_size.
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell