http://t3x.org/t3x/0/exam-string.html

T3X

T3X/0

Example Programs

T3X/0 homepage
Examples: bubblesort | mandelbrot | ntoa | strings

Miscellaneous string operations.

use t3x: t;

! length limited to 32766 bytes
length(s) return t.memscan(s, 0, 32767);

copy(d, s) t.memcopy(s, d, length(s)+1);

append(d, s)
    t.memcopy(@d::length(d), s, length(s)+1);

equal(s1, s2)
    return t.memcomp(s1, s2, length(s1)+1) = 0;

writes(s) t.write(T3X.SYSOUT, s, length(s));

contact  |  privacy