shithub: mc

ref: 4bff4b0a1771d2b450feceb3c2177d76c3adb504
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
}