MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / find

Method find

source/core/StarString.cpp:467–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467size_t String::find(Char c, size_t pos, CaseSensitivity cs) const {
468 auto it = begin();
469 for (size_t i = 0; i < pos; ++i) {
470 if (it == end())
471 break;
472 ++it;
473 }
474
475 while (it != end()) {
476 if (charEqual(c, *it, cs))
477 return pos;
478 ++pos;
479 ++it;
480 }
481
482 return NPos;
483}
484
485size_t String::find(String const& str, size_t pos, CaseSensitivity cs) const {
486 if (str.empty())

Callers 1

splitMethod · 0.45

Calls 5

beginFunction · 0.85
endFunction · 0.85
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected