shithub: mc

ref: 4e656a4f039b9230c820f12d3b1e4a5c8e55cf47
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
}