shithub: mc

ref: 95d4d77544f1ea32ecbef832d9b962ebb7a950c2
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
}