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

Method findLast

source/core/StarStringView.cpp:225–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225size_t StringView::findLast(Char c, CaseSensitivity cs) const {
226 auto it = begin();
227
228 size_t found = NPos;
229 size_t pos = 0;
230 while (it != end()) {
231 if (String::charEqual(c, *it, cs))
232 found = pos;
233 ++pos;
234 ++it;
235 }
236
237 return found;
238}
239
240size_t StringView::findLast(StringView str, CaseSensitivity cs) const {
241 if (str.empty())

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected