Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].
start
Optional start position. Default: start of the bytes.
end
Optional stop position. Default: end of the bytes.
Raise ValueError if the subsection is not found.