shithub: mc

ref: 983a758d3127bf5d861227e6a9c56900bf6e2da8
dir: /lib/std/hasprefix.myr/

View raw version
use "cmp.use"
pkg std =
	const hasprefix	: (s : byte[:], pre : byte[:] -> bool)
;;

const hasprefix = {s, pre
       match strncmp(s, pre, pre.len)
       | `Equal:       -> true
       | _:            -> false
       ;;
}