This is a crate for caching a repeat pattern of a str
with only one allocation by generate a new RepStr struct
this crate provides.
Example 1: Crate RepStr directly.
use RepStr;
let repstr = new; // generate a RepStr object with max repeat time 50
assert!;
assert!;
// no extra allocation would occurs:
assert!
// repstr.repeat_unwrap(51) // panic!
Example 2: Crate RepStr by IntoRepStr trait
use IntoRepStr;
let repstr = "🦀".repeat_cache;
assert!;
assert!;