ref: a277cea8fabeb3ec38484ffc461ae86e5fd8f9b5
dir: /lib/std/cstrconv.myr/
use "types" pkg std = const cstrlen : (buf : byte[:] -> size) const cstrconv : (buf : byte[:] -> byte[:]) const cstrconvp : (p : byte# -> byte[:]) ;; const cstrconv = {buf for var i = 0; i < buf.len; i++ if buf[i] == 0 -> buf[:i] ;; ;; -> buf } const cstrconvp = {p var i, base i = 0 base = (p : intptr) while (base + i : byte#)# != 0 i++ ;; -> p[:i] } const cstrlen = {buf for var i = 0; i < buf.len; i++ if buf[i] == 0 -> i ;; ;; -> 0 }