shithub: mc

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