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

Method findFirstOf

source/core/StarString.cpp:562–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562size_t String::findFirstOf(String const& pattern, size_t beg) const {
563 auto it = begin();
564 size_t i;
565 for (i = 0; i < beg; ++i)
566 ++it;
567
568 while (it != end()) {
569 if (pattern.hasCharOrWhitespace(*it))
570 return i;
571 ++it;
572 ++i;
573 }
574 return NPos;
575}
576
577size_t String::findFirstNotOf(String const& pattern, size_t beg) const {
578 auto it = begin();

Callers

nothing calls this directly

Calls 3

beginFunction · 0.85
endFunction · 0.85
hasCharOrWhitespaceMethod · 0.45

Tested by

no test coverage detected