Skip to main content

Crate rapidstr2int

Crate rapidstr2int 

Source
Expand description

rapidstr2int — fast, dependency-free string -> 32-bit unsigned integer hashing.

Implements FNV-1a (Fowler–Noll–Vo) over the UTF-8 bytes of the input. Deterministic and stable across platforms; useful for hash tables, shard keys, bloom filters and cache bucketing.

Functions§

str_to_hex
Same hash as a fixed-width 8-char lowercase hex string.
str_to_int
Hash a string to a 32-bit unsigned integer (FNV-1a over UTF-8 bytes).