236 {
239
240 fl::size max_start =
mSize - sv.mSize;
242 if (search_start + sv.mSize >
mSize) {
243 search_start = max_start;
244 }
245
246 for (fl::size i = search_start + 1; i > 0; --i) {
247 fl::size idx = i - 1;
248 if (idx + sv.mSize >
mSize)
continue;
249 bool match = true;
250 for (fl::size j = 0; j < sv.mSize; ++j) {
251 if (
mData[idx + j] != sv.mData[j]) {
252 match = false;
253 break;
254 }
255 }
256 if (match) return idx;
257 }
259 }
static constexpr fl::size npos