shithub: mc

ref: f16bf0e4f8dd5f23b41cfbfa6c24fd0ab79e6dad
dir: /libstd/hassuffix.myr/

View raw version
use "sleq.use"
pkg std =
	const hassuffix	: (s : byte[:], suff : byte[:] -> bool)
;;

const hassuffix = {s, suff
	var tail

	if suff.len <= s.len
		tail = s[s.len - suff.len:]
		-> sleq(tail, suff)
	;;
	-> false
}