Lines Matching defs:memchr
18 # Example: using `memchr`
20 This example shows how to use `memchr` to find the first occurrence of `z` in
24 use memchr::memchr;
27 assert_eq!(Some(10), memchr(b'z', haystack));
36 use memchr::memchr3_iter;
53 use memchr::memmem;
72 use memchr::memmem;
83 a dedicated routine like `memchr` for something that could be implemented
87 fn memchr(needle: u8, haystack: &[u8]) -> Option<usize> {
111 The `memchr` routine in this crate has _slightly_ worse latency than the
116 **NOTE:** The name `memchr` comes from the corresponding routine in libc. A key
135 implementations of substring search. For `memchr`, all targets have
149 platform's libc implementation of `memchr` (and `memrchr` on Linux). This
152 (e.g., `memchr[23]` and substring search) unconditionally use the
163 // bug report at https://github.com/BurntSushi/memchr
169 compile_error!("memchr currently not supported on non-{16,32,64}");
171 pub use crate::memchr::{
172 memchr, memchr2, memchr2_iter, memchr3, memchr3_iter, memchr_iter,
178 mod memchr;