shithub: mc

ref: 0b7ef3870dbd708ab71a657dca0e26073036acb7
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
}