mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
16 lines
467 B
C
16 lines
467 B
C
// #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));
|
|
} |