Crate memx[][src]

Expand description

memx minics libc.

This crate is implemented memory functions like libc memcmp(), memchr(), memmem(), memcpy(), memset().

Features

  • Rewriting with rust lang.
  • minimum support rustc 1.46.0 (04488afe3 2020-08-24)

Todo

  • Support the zero overhead trait.
  • Support more fast routine on armv7-android
  • Support more fast routine on x86_64
  • Support #![no_std]

Modules

Structs

used by memcpy()

Functions

This mimics libc::memchr(), same as buf.iter().position(|&x| x == c).

This mimics libc::memcmp(), same as a.cmp(&b).

This mimics libc::memcpy(), same as dst = src.

This mimics libc::bcmp(), same as a == b.

This mimics libc::memmem(), same as (haystack as &str).find(needle as &str) or haystack.windows(needle.len()).position(|window| window == needle).

This is same as buf.iter().position(|&x| x != c), not included libc.

This mimics libc::memrchr(), same as buf.iter().rposition(|&x| x == c).

This mimics libc::memrmem(), same as (haystack as &str).rfind(needle as &str) or haystack.windows(needle.len()).rposition(|window| window == needle).

This is same as buf.iter().rposition(|&x| x != c), not included libc.

This mimics libc::memset(), same as buf.fill(c).