1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*!
This crate provides an `String` implementation which is optimized for string-manipulations,
such as concatenating and slicing.
It is suited for situations where there are lots of dynamic concatenating and slicing such
as, but not limited to, Parsers, Interpreters, Template Engines and more.
# Example
Event though this example doesn't actually improve the performance (even decreases it), it
can demonstrate the basic usage of this library.
```rust
use dynstr::DynamicString;
fn main() {
let s0 = DynamicString::new("Hello");
let s1 = DynamicString::new("World");
let con: DynamicString = s0 + " " + s1;
println!("{}", con);
let hello = con.slice(0, 5);
assert_eq!(hello, "Hello");
}
```
Note: Any string that has less than 16 bytes is flattened.
(Gets copied instead of being referenced.)
*/
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub const MIN_SLICE_LENGTH: usize = 16;