memcmp

public func memcmp(consuming RawPointer, consuming RawPointer, consuming Int64) -> Int32

Wraps memcmp(3) — compares the first n bytes of a and b.

Returns a negative value if the first differing byte in a is less than the corresponding byte in b, zero if all bytes are equal, positive otherwise. Comparison is unsigned, byte-by-byte.

Safety

Both a and b must be valid for n bytes.

Defined in lang/std/ffi/libc.ks