cowstr 0.2.0

Copy-on-Write shared strings
Documentation

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::Rc for sharing strings. Default is std::sync::Arc.