MCPcopy Create free account
hub / github.com/Simsys/qhexedit2 / indexOf

Method indexOf

src/chunks.cpp:176–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174// ***************************************** Search API
175
176qint64 Chunks::indexOf(const QByteArray &ba, qint64 from)
177{
178 qint64 result = -1;
179 QByteArray buffer;
180
181 for (qint64 pos=from; (pos < _size) && (result < 0); pos += BUFFER_SIZE)
182 {
183 buffer = data(pos, BUFFER_SIZE + ba.size() - 1);
184 int findPos = buffer.indexOf(ba);
185 if (findPos >= 0)
186 result = pos + (qint64)findPos;
187 }
188 return result;
189}
190
191qint64 Chunks::lastIndexOf(const QByteArray &ba, qint64 from)
192{

Callers 3

findNextMethod · 0.45
jquery.jsFile · 0.45
SearchBoxFunction · 0.45

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected