#[std] fn strlen(str: &char) -> num { for (let i=0; str[i] != '\0'; i=i+1) {} return i; } fn strcpy(dst: &char, src: &char) { for (let i=0; src[i] != '\0'; i=i+1) { dst[i] = src[i]; } dst[i] = 0; } fn strcat(dst: &char, src: &char) { let offset: num = strlen(dst); for (let i=0; src[i] != '\0'; i=i+1) { dst[offset+i] = src[i]; } dst[offset+i] = 0; } fn main() { let size = 32; let s = alloc(size) as &char; strcpy(s, "test"); putstrln(s); strcat(s, "ing"); putstrln(s); free s: size; }