intern_string

Crates.iointern_string
lib.rsintern_string
version0.2.0
sourcesrc
created_at2024-01-05 21:06:43.713164
updated_at2024-01-07 19:52:36.993573
descriptionFast and memory efficient string interning for Rust
homepage
repositoryhttps://github.com/anonrig/string_interner
max_upload_size
id1090464
size9,512
Yagiz Nizipli (anonrig)

documentation

README

String Interning

Fast and efficient string interning with a simple API.

Features

  • Intern strings and get a unique ID for each string.
  • Initialize with a pre-allocated capacity.

Installation

Add the following to your Cargo.toml:

[dependencies]
intern_string = "0.1.0"

Usage

use intern_string::Intern;

let mut interner = Intern::new();
let id = interner.intern("hello");
assert_eq!(interner.lookup(id), 0);
Commit count: 0

cargo fmt