core :: BytePattern :: search_all_in
self
b
# Returns the indexes of all the occurences of `self` in `b` fun search_all_in(b: SequenceRead[Int]): SequenceRead[Int] is abstract
redef fun search_all_in(b) do var ret = new Array[Int] var pos = 0 loop pos = first_index_in_from(b, pos) if pos == -1 then return ret ret.add pos pos += 1 end end
redef fun search_all_in(b) do var ret = new Array[Int] var pos = first_index_in_from(b, 0) if pos == -1 then return ret pos = pos + 1 ret.add pos loop pos = first_index_in_from(b, pos) if pos == -1 then return ret ret.add pos pos += length end end