// #target: macos-x64 module test; import std::io; import libc; fn void main() { int[] ab = { 3, 5, 6, 10, 0x0b2399 }; int[] cd = { 3, 5, 6, 10, 0x0b2399 }; char[] x = "hello world!"; char[] y = "hello world?"; io::printfn("is matching: %s", mem::equals(ab, cd)); io::printfn("is matching: %s", mem::equals(x, y)); io::printfn("is matching: %s", mem::equals(x.ptr, y.ptr, x.len)); io::printfn("is matching: %s", mem::equals(ab.ptr, cd.ptr, ab.len * 4, 4)); }