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

Method substring

src/fl/stl/string.cpp.hpp:151–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149// ======= SUBSTRING =======
150
151string string::substring(fl::size start, fl::size end) const FL_NOEXCEPT {
152 if (start == 0 && end == size()) return *this;
153 if (start >= size()) return string();
154 if (end > size()) end = size();
155 if (start >= end) return string();
156 string out;
157 out.copy(c_str() + start, end - start);
158 return out;
159}
160
161string string::substr(fl::size start, fl::size length) const FL_NOEXCEPT {
162 // Handle `npos` / overflow: when `length == npos` the caller

Callers 6

updateButtonTextMethod · 0.80
createHelpFunction · 0.80
updateUiComponentsMethod · 0.80
readInputFromSerialMethod · 0.80
parseCommandMethod · 0.80
FL_TEST_FILEFunction · 0.80

Calls 3

sizeFunction · 0.70
stringClass · 0.70
copyMethod · 0.45

Tested by

no test coverage detected