Property definitions

core $ BytePattern :: defaultinit
# Any kind of entity which can be searched for in a Sequence of Byte
interface BytePattern
	# Return the first occurence of `self` in `b`, or -1 if not found
	fun first_index_in(b: SequenceRead[Int]): Int do return first_index_in_from(b, 0)

	# Return the first occurence of `self` in `b` starting at `from`, or -1 if not found
	fun first_index_in_from(b: SequenceRead[Int], from: Int): Int is abstract

	# Return the last occurence of `self` in `b`, or -1 if not found
	fun last_index_in(b: SequenceRead[Int]): Int do return last_index_in_from(b, b.length - 1)

	# Return the last occurence of `self` in `b`, or -1 if not found
	fun last_index_in_from(b: SequenceRead[Int], from: Int): Int is abstract

	# Returns the indexes of all the occurences of `self` in `b`
	fun search_all_in(b: SequenceRead[Int]): SequenceRead[Int] is abstract

	# Length of the pattern
	fun pattern_length: Int is abstract

	# Appends `self` to `b`
	fun append_to(b: Sequence[Int]) is abstract

	# Is `self` a prefix for `b` ?
	fun is_prefix(b: SequenceRead[Int]): Bool is abstract

	# Is `self` a suffix for `b` ?
	fun is_suffix(b: SequenceRead[Int]): Bool is abstract
end
lib/core/bytes.nit:22,1--50,3