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

Method at

source/core/StarStringView.cpp:79–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79StringView::Char StringView::at(size_t index) const {
80 auto it = begin();
81 auto itEnd = end();
82 for (size_t i = 0; i < index; ++i) {
83 ++it;
84 if (it == itEnd)
85 throw OutOfRangeException(strf("Out of range in StringView::at({})", i));
86 }
87 return *it;
88}
89
90bool StringView::endsWith(StringView end, CaseSensitivity cs) const {
91 auto endsize = end.size();

Callers 1

findNextBoundaryMethod · 0.95

Calls 3

beginFunction · 0.85
endFunction · 0.85
strfFunction · 0.85

Tested by

no test coverage detected