MCPcopy Create free account
hub / github.com/FastLED/FastLED / substr

Method substr

src/fl/stl/string_view.h:142–151  ·  view source on GitHub ↗

Substring operations

Source from the content-addressed store, hash-verified

140
141 // Substring operations
142 string_view substr(fl::size pos = 0, fl::size count = npos) const FL_NOEXCEPT {
143 if (pos >= mSize) {
144 return string_view();
145 }
146 fl::size actual_count = count;
147 if (actual_count == npos || pos + actual_count > mSize) {
148 actual_count = mSize - pos;
149 }
150 return string_view(mData + pos, actual_count);
151 }
152
153 // ======= COMPARISON OPERATIONS =======
154 int compare(string_view other) const FL_NOEXCEPT {

Callers 1

compareMethod · 0.45

Calls 1

string_viewClass · 0.70

Tested by

no test coverage detected