pstr

Crates.iopstr
lib.rspstr
version0.7.0
sourcesrc
created_at2020-10-20 04:55:37.624244
updated_at2020-11-02 07:17:04.058721
descriptionGlobal String Intern Pool
homepage
repositoryhttps://github.com/volight/pstr
max_upload_size
id303315
size71,383
Package (2A5F)

documentation

README

Global string intern pool

Rust version documentation LICENSE

Internal use of DashMap for concurrent support

Examples

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());
Commit count: 34

cargo fmt