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

Method erase

src/fl/stl/basic_string.h:382–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380 // Iterator-based erase (SFINAE for pointer types)
381 template<typename T>
382 typename fl::enable_if<fl::is_pointer<T>::value && fl::is_same<typename fl::remove_cv<typename fl::remove_pointer<T>::type>::type, char>::value, char*>::type
383 erase(T it_pos) FL_NOEXCEPT {
384 if (!it_pos) return end();
385 const char* str_begin = c_str();
386 const char* str_end = str_begin + mLength;
387 if (it_pos < str_begin || it_pos >= str_end) return end();
388 fl::size pos = it_pos - str_begin;
389 erase(pos, 1);
390 return begin() + pos;
391 }
392
393 template<typename T>
394 typename fl::enable_if<fl::is_pointer<T>::value && fl::is_same<typename fl::remove_cv<typename fl::remove_pointer<T>::type>::type, char>::value, char*>::type

Callers

nothing calls this directly

Calls 3

endFunction · 0.70
eraseFunction · 0.70
beginFunction · 0.70

Tested by

no test coverage detected