Is self a suffix for b ?

Property definitions

core $ BytePattern :: is_suffix
	# Is `self` a suffix for `b` ?
	fun is_suffix(b: SequenceRead[Int]): Bool is abstract
lib/core/bytes.nit:48,2--49,54

core :: bytes $ Int :: is_suffix
	#     assert u'b'.is_suffix("baqsdb".to_bytes)
	#     assert not u'b'.is_suffix("baqsd".to_bytes)
	redef fun is_suffix(b) do return b.length != 0 and b.last == self
lib/core/bytes.nit:133,2--135,66

core $ Bytes :: is_suffix
	redef fun is_suffix(b) do
		if length > b.length then return false
		var j = b.length - 1
		var i = length - 1
		while i > 0 do
			if self[i] != b[j] then return false
			i -= 1
			j -= 1
		end
		return true
	end
lib/core/bytes.nit:755,2--765,4