shithub: mc

ref: e033f64d7b8cf260a7560d41949f1914048f90d7
dir: /libstd/cstrconv.myr/

View raw version
pkg std =
	const cstrconv	: (buf : byte[:] -> byte[:])
;;

const cstrconv = {buf
	var i

	for i = 0; i < buf.len; i++
		if buf[i] == 0
			-> buf[:i]
		;;
	;;
	-> buf
}