#string #truncate #human

ellipse

Truncate and ellipse strings in a human-friendly way

2 unstable releases

0.2.0 Apr 22, 2019
0.1.0 Apr 17, 2019

#1009 in Text processing

Download history 350/week @ 2024-04-03 322/week @ 2024-04-10 317/week @ 2024-04-17 323/week @ 2024-04-24 327/week @ 2024-05-01 328/week @ 2024-05-08 332/week @ 2024-05-15 336/week @ 2024-05-22 461/week @ 2024-05-29 450/week @ 2024-06-05 333/week @ 2024-06-12 336/week @ 2024-06-19 351/week @ 2024-06-26 191/week @ 2024-07-03 235/week @ 2024-07-10 278/week @ 2024-07-17

1,105 downloads per month
Used in 6 crates

MIT/Apache

5KB

ellipse

Travis CI Status crates.io Documentation

Truncate and ellipse strings in a human-friendly way. Uses unicode extended grapheme clusters.

Documentation

Example

use ellipse::Ellipse;

let input = "🇩🇪🇬🇧🇮🇹🇫🇷";
assert_eq!(&input.truncate_ellipse(2), "🇩🇪🇬🇧...");

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~550KB