cowstr 0.5.0

Copy-on-Write shared strings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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`. Since `SubStr` are always immutable they store
the referred span directly which makes dereferencing them faster than `CowStr`.


# Features

 * **singlethreaded** uses `std::rc::Rc` for sharing strings. Default is `std::sync::Arc`.