MCPcopy Create free account
hub / github.com/SpartanJ/eepp / find

Method find

src/eepp/core/string.cpp:474–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474Int64 String::BMH::find( const std::string& haystack, const std::string& needle,
475 const size_t& haystackOffset, const OccTable& occ ) {
476 size_t result = search( (const unsigned char*)haystack.c_str() + haystackOffset,
477 haystack.size() - haystackOffset, (const unsigned char*)needle.c_str(),
478 needle.size(), occ );
479 if ( result == haystack.size() - haystackOffset ) {
480 return -1;
481 } else {
482 return (Int64)haystackOffset + result;
483 }
484}
485
486Int64 String::BMH::find( const std::string& haystack, const std::string& needle,
487 const size_t& haystackOffset ) {

Callers 9

addPointerInPlaceMethod · 0.45
reallocPointerMethod · 0.45
removePointerMethod · 0.45
globMatchMethod · 0.45
splitMethod · 0.45
containsMethod · 0.45
replaceAllMethod · 0.45
replaceMethod · 0.45
valueIndexMethod · 0.45

Calls 3

findFunction · 0.85
c_strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected