Registry / utility / memchr

memchr

JSON →
library2.8.2rscratesunverified

Provides extremely fast (uses SIMD on x86_64, aarch64 and wasm32) routines for 1, 2 or 3 byte search and single substring search.

# Cargo.toml [dependencies] memchr = "2.8.2"
INSTALL
IMPORT
SIG · MEMCHR
M
memchr
utilityrustv2.8.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

memchr
use memchr::memchr;

Minimal example finding the first occurrence of a byte in a byte slice.

use memchr::memchr; fn main() { let haystack = b"hello world"; if let Some(pos) = memchr(b'w', haystack) { println!("Found 'w' at position {}", pos); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.8.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
memchr — cargo add memchr · libregistry