I'm doing some pure memory compare stuff, and spuriously found no way to use some function like
memcmp in C, for example:
let src : *const u8 = ... let dst: *const u8 = ... memcmp(src, dst, len);
so is there any alternative in Rust, doing the same thing? I found keyword
memcmp was mentioned in Rust core's doc, but I didn't find a way to use it.
P.S. I'm doing FFI stuff, in this case, I must use pointers for comparing, I can use transmute to force cast my pointer to a slice, but I don't know if it is a good idea (honestly speaking I don't know how to cast a pointer to a slice using transmute either...)