Is self a prefix for b ?

Property definitions

core $ BytePattern :: is_prefix
	# Is `self` a prefix for `b` ?
	fun is_prefix(b: SequenceRead[Int]): Bool is abstract
lib/core/bytes.nit:45,2--46,54

core :: bytes $ Int :: is_prefix
	#     assert u'b'.is_prefix("baqsdb".to_bytes)
	#     assert not u'b'.is_prefix("aqsdb".to_bytes)
	redef fun is_prefix(b) do return b.length != 0 and b.first == self
lib/core/bytes.nit:137,2--139,67

core $ Bytes :: is_prefix
	redef fun is_prefix(b) do
		if length > b.length then return false
		for i in [0 .. length[ do if self[i] != b[i] then return false
		return true
	end
lib/core/bytes.nit:767,2--771,4