diff --git a/README.md b/README.md index e2157c2..4eafe53 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ gleam add string_width@3 `string_width` provides functions to measure the required amount of cells, and then layout strings in an ANSI-aware manner. It includes ready-to-use layout functions like [limit](./string_width.html#limit "Word wrapping and truncation") or [stack_horizontal](./string_width.html#stack_horizontal "Build column-based layouts"), as well as low-level primitives, allowing you to build your own layout algorithms. -All Gleam targets are supported, and it passes the tests of the NPM [string-width](https://www.npmjs.com/package/string-width) and [unicode-width](https://crates.io/crates/unicode-width) crate where applicable. Compared to others, a heavy focus is put on on reporting the actual width of strings in terminals instead (Check out [Internals](./internals.html)) for more information.) +All Gleam targets are supported, and it passes the tests of the NPM [string-width](https://www.npmjs.com/package/string-width) and [unicode-width](https://crates.io/crates/unicode-width) crate where applicable. Compared to others, a heavy focus is put on on reporting the actual width of strings in terminals instead (Check out [Internals](./internals.html) for more information.) It is also one of the fastest options available, even including target-specific ones, while still providing you full flexibility and correctness. @@ -49,7 +49,7 @@ pub fn main() { // get the size of the terminal, or fallback to a default size. let term_size = string_width.get_terminal_size() - |> result.unwrap(Size(rows: 80, columns: 24)) + |> result.unwrap(Size(rows: 24, columns: 80)) // how big does the left-hand side need to be? let left_width = diff --git a/test/tour.gleam b/test/tour.gleam index 822e983..b24aa78 100644 --- a/test/tour.gleam +++ b/test/tour.gleam @@ -26,7 +26,7 @@ pub fn main() { // get the size of the terminal, or fallback to a default size. let term_size = string_width.get_terminal_size() - |> result.unwrap(Size(rows: 80, columns: 24)) + |> result.unwrap(Size(rows: 24, columns: 80)) // how big does the left-hand side need to be? let left_width =