shithub: mc

ref: 61843c7772ad1dfb1a8688ac02a5d8153a8c25ca
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
}