You've already forked ansi-width
mirror of
https://github.com/uutils/ansi-width.git
synced 2026-06-10 16:13:22 -07:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b31eed26cd | |||
| 8e772e8527 | |||
| 3a062a06bf | |||
| 0b087bd663 | |||
| 3b7e6e78a8 | |||
| 987ed173a9 | |||
| ee3193972e | |||
| b574a84613 | |||
| 3d6c707ddd | |||
| c2910efb5c | |||
| 65caa0fd87 | |||
| 580f990e6e | |||
| 0820f35843 |
+4
-1
@@ -3,12 +3,15 @@ name = "ansi-width"
|
||||
description = "Calculate the width of a string when printed to the terminal"
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
homepage = "https://github.com/uutils/ansi-width"
|
||||
repository = "https://github.com/uutils/ansi-width"
|
||||
authors = ["uutils developers"]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.70"
|
||||
exclude = ["/renovate.json"]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
unicode-width = "0.1.11"
|
||||
unicode-width = "0.2.0"
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
[](https://crates.io/crates/ansi-width)
|
||||
[](https://discord.gg/wQVJbvJ)
|
||||
[](https://github.com/uutils/ansi-width/blob/main/LICENSE)
|
||||
[](https://deps.rs/repo/github/uutils/ansi-width)
|
||||
|
||||
[](https://codecov.io/gh/uutils/ansi-width)
|
||||
|
||||
# ANSI width
|
||||
|
||||
Measure the width of a string when printed to the terminal
|
||||
@@ -74,10 +81,9 @@ assert_eq!(
|
||||
might be what you want if you don't care about ANSI codes. `unicode-width` is
|
||||
used internally by this crate as well.
|
||||
- [`textwrap::core::display_width`](https://docs.rs/textwrap/latest/textwrap/core/fn.display_width.html):
|
||||
Similar functionality to this crate, except that it does not support ANSI
|
||||
hyperlinks. Another advantage of this crate is that it does not require
|
||||
pulling in the rest of `textwrap`'s functionality (even though that
|
||||
functionality is excellent if you need it).
|
||||
Very similar functionality to this crate and it also supports hyperlinks since version 0.16.1. The
|
||||
advantage of this crate is that it does not require pulling in the rest of `textwrap`'s functionality
|
||||
(even though that functionality is excellent if you need it).
|
||||
- [`console::measure_text_width`](https://docs.rs/console/latest/console/fn.measure_text_width.html):
|
||||
Similar to `textwrap` and very well-tested. However, it constructs a new
|
||||
string internally without ANSI codes first and then measures the width of
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:base"
|
||||
"config:recommended"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user