shithub: mc

ref: 124965cc6607aacf1c8a292e9d9bd1b8f2ea5ca4
dir: /libstd/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
       ;;
}