truncatable 0.1.1

Small crate for truncatable strings
Documentation

Truncatable

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

Crates.io

Usage

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