shithub: mc

ref: 515b8e89c1a6c0859eaefbf7835a4e6497a57e0b
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
       ;;
}