| Crates.io | truncatable |
| lib.rs | truncatable |
| version | 0.1.3 |
| created_at | 2021-05-17 04:02:35.08232+00 |
| updated_at | 2021-05-17 16:03:17.200708+00 |
| description | Small crate for truncatable strings |
| homepage | |
| repository | https://github.com/Vassili-Dev/rust-truncatable |
| max_upload_size | |
| id | 398453 |
| size | 6,099 |
Truncatable is a small rust crate for Strings that should append a follower when truncated (eg, ellipsis).
use truncatable::Truncatable;
let to_truncate = Truncatable::from("Hello World!").truncator("~~".into());
assert_eq!(to_truncate.truncate(5), String::from("Hello~~"));