Crates.io | pstr |
lib.rs | pstr |
version | 0.7.0 |
source | src |
created_at | 2020-10-20 04:55:37.624244 |
updated_at | 2020-11-02 07:17:04.058721 |
description | Global String Intern Pool |
homepage | |
repository | https://github.com/volight/pstr |
max_upload_size | |
id | 303315 |
size | 71,383 |
Global string intern pool
Internal use of DashMap for concurrent support
use pstr::IStr;
let s = IStr::new("hello world");
use pstr::MowStr;
let mut s = MowStr::new("hello");
assert!(s.is_interned());
s.push_str(" ");
assert!(s.is_mutable());
s.mutdown().push_str("world");
assert_eq!(s, "hello world");
s.intern();
assert!(s.is_interned());