MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / rfind

Method rfind

tests/framework/src/doctest.cpp:685–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683}
684
685String::size_type String::rfind(char ch, size_type pos) const {
686 const char* begin = c_str();
687 const char* it = begin + std::min(pos, size() - 1);
688 for (; it >= begin && *it != ch; it--);
689 if (it >= begin) { return static_cast<size_type>(it - begin); }
690 else { return npos; }
691}
692
693int String::compare(const char* other, bool no_case) const {
694 if(no_case)

Callers 2

test_run_startMethod · 0.45
test_run_endMethod · 0.45

Calls 3

c_strFunction · 0.50
minFunction · 0.50
sizeFunction · 0.50

Tested by

no test coverage detected