Fast and efficient string interning with a simple API.
- Intern strings and get a unique ID for each string.
- Initialize with a pre-allocated capacity.
Add the following to your Cargo.toml:
[dependencies]
intern_string = "0.1.0"use intern_string::Intern;letmut interner = Intern::new();let id = interner.intern("hello");assert_eq!(interner.lookup(id),0);