Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 563 Bytes

README.md

File metadata and controls

17 lines (12 loc) · 563 Bytes

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~~"));