core :: BytePattern
core :: BytePattern :: defaultinit
core :: BytePattern :: first_index_in
Return the first occurence ofself
in b
, or -1 if not found
core :: BytePattern :: first_index_in_from
Return the first occurence ofself
in b
starting at from
, or -1 if not found
core :: BytePattern :: is_prefix
Isself
a prefix for b
?
core :: BytePattern :: is_suffix
Isself
a suffix for b
?
core :: BytePattern :: last_index_in
Return the last occurence ofself
in b
, or -1 if not found
core :: BytePattern :: last_index_in_from
Return the last occurence ofself
in b
, or -1 if not found
core :: BytePattern :: search_all_in
Returns the indexes of all the occurences ofself
in b
core $ BytePattern :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
core :: BytePattern :: defaultinit
core :: BytePattern :: first_index_in
Return the first occurence ofself
in b
, or -1 if not found
core :: BytePattern :: first_index_in_from
Return the first occurence ofself
in b
starting at from
, or -1 if not found
core :: BytePattern :: is_prefix
Isself
a prefix for b
?
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: BytePattern :: is_suffix
Isself
a suffix for b
?
core :: BytePattern :: last_index_in
Return the last occurence ofself
in b
, or -1 if not found
core :: BytePattern :: last_index_in_from
Return the last occurence ofself
in b
, or -1 if not found
core :: Object :: output_class_name
Display class name on stdout (debug only).core :: BytePattern :: search_all_in
Returns the indexes of all the occurences ofself
in b
# 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