MCPcopy Create free account
hub / github.com/creatale/node-dv / findString

Function findString

deps/tesseract/opencl/openclwrapper.cpp:265–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265static const char *findString(const char *contentStart, const char *contentEnd,
266 const char *string) {
267 size_t stringLength;
268 const char *currentPosition;
269 const char *found = NULL;
270 stringLength = strlen(string);
271 currentPosition = contentStart;
272 for (currentPosition = contentStart; currentPosition < contentEnd;
273 currentPosition++) {
274 if (*currentPosition == string[0]) {
275 if (currentPosition + stringLength < contentEnd) {
276 if (strncmp(currentPosition, string, stringLength) == 0) {
277 found = currentPosition;
278 break;
279 }
280 }
281 }
282 }
283 return found;
284}
285
286static ds_status readProFile(const char *fileName, char **content,
287 size_t *contentSize) {

Callers 1

readProfileFromFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected