996 {
999
1000
1003 }
1004
1005 fl::size actualCount = count;
1008 }
1009 fl::size newLen =
mLength - actualCount + count2;
1010
1011
1017 fl::size remainingLen =
mLength -
pos - actualCount;
1018 if (remainingLen > 0) {
1019 fl::memcpy(newData->data() +
pos + count2, heap->data() +
pos + actualCount, remainingLen);
1020 }
1021 newData->data()[newLen] = '\0';
1024 return *this;
1025 }
1026
1027
1029 if (count2 != actualCount) {
1030 fl::size remainingLen =
mLength -
pos - actualCount;
1031 if (remainingLen > 0) {
1033 }
1034 }
1038 return *this;
1039 }
1040
1041
1043 if (canReplaceInPlace) {
1045 canReplaceInPlace = heap.get().use_count() <= 1 && heap->hasCapacity(newLen);
1046 if (canReplaceInPlace) {
1047 char*
data = heap->data();
1048 if (count2 != actualCount) {
1049 fl::size remainingLen =
mLength -
pos - actualCount;
1050 if (remainingLen > 0) {
1052 }
1053 }
1057 }
1058 }
1059 if (!canReplaceInPlace) {
1061 const char* src =
c_str();
1064 fl::size remainingLen =
mLength -
pos - actualCount;
1065 if (remainingLen > 0) {
1066 fl::memcpy(newData->data() +
pos + count2, src +
pos + actualCount, remainingLen);
1067 }
1068 newData->data()[newLen] = '\0';
1071 }
1072 return *this;
1073}
bool isNonOwning() const FL_NO_EXCEPT
void materialize() FL_NO_EXCEPT
NotNullStringHolderPtr & heapData() FL_NO_EXCEPT
bool hasHeapData() const FL_NO_EXCEPT
static constexpr fl::size npos
char * inlineBufferPtr() FL_NO_EXCEPT
fl::variant< NotNullStringHolderPtr, ConstLiteral, ConstView > mStorage
const char * c_str() const FL_NO_EXCEPT
const char * data() const FL_NO_EXCEPT
basic_string & erase(fl::size pos=0, fl::size count=npos) FL_NO_EXCEPT
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
fl::not_null< StringHolderPtr > NotNullStringHolderPtr
FASTLED_FORCE_INLINE void * memmove(void *dest, const void *src, size_t n) FL_NO_EXCEPT
FASTLED_FORCE_INLINE void * memcpy(void *dest, const void *src, size_t n) FL_NO_EXCEPT
pair_element< I, T1, T2 >::type & get(pair< T1, T2 > &p) FL_NO_EXCEPT