self
in b
, or -1 if not found
# 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
lib/core/bytes.nit:33,2--34,73
redef fun last_index_in_from(b, from) do
if is_empty then return -1
var lst = self[length - 1]
var bpos = lst.last_index_in_from(b, from)
for i in [0 .. length[.step(-1) do
if self[i] != b[bpos] then return last_index_in_from(b, bpos - 1)
bpos -= 1
end
return bpos
end
lib/core/bytes.nit:631,2--640,4