This library defines two string helper classes.
CowStr
Is a String that can be initialized to a static string or be build dynamically. Its contents can then be immutably shared. When mutation is required the string will be copied first.
SubStr
Refers to a (immutable) span inside a CowStr.
Features
- singlethreaded uses
std::rc::Rcfor sharing strings. Default isstd::sync::Arc.