truncatable

Crates.iotruncatable
lib.rstruncatable
version0.1.3
sourcesrc
created_at2021-05-17 04:02:35.08232
updated_at2021-05-17 16:03:17.200708
descriptionSmall crate for truncatable strings
homepage
repositoryhttps://github.com/Vassili-Dev/rust-truncatable
max_upload_size
id398453
size6,099
(Vassili-Dev)

documentation

README

Truncatable

Truncatable is a small rust crate for Strings that should append a follower when truncated (eg, ellipsis).

Crates.io Build

Usage

use truncatable::Truncatable;
let to_truncate = Truncatable::from("Hello World!").truncator("~~".into());
assert_eq!(to_truncate.truncate(5), String::from("Hello~~"));
Commit count: 14

cargo fmt