Crate wmemchr

Source
Expand description

A safe highly optimised alternative to libc wmemchr.

This library provides optimised functions for the purpose of searching wide character slices.

§Examples

Basic usage:

use wchar::wch;
use wmemchr::wmemchr;

let needle = wch!('w');
let haystack = wch!("Hello world!");

assert_eq!(wmemchr(needle, haystack), Some(6));

Modules§

fallback
Pure Rust platform independent implementation designed for speed.
naive
A naive implementation.
x86_64
Optimised implementation for x86_64 platforms.

Traits§

Wide
A trait for wide character types.

Functions§

wmemchr
Returns the index of the first occurrence of a wide character in a slice, or None if the character is not found.