shithub: mc

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