Skip to main content

memcmp

Function memcmp 

Source
pub unsafe fn memcmp(a: *const u8, b: *const u8, n: usize) -> Ordering
Expand description

Compare n bytes between two memory regions.

Returns Ordering::Equal if the regions are identical, or the ordering of the first differing byte (lexicographic comparison).

ยงSafety

Both a and b must be valid for n bytes.