1080 {
1082
1083
1086 }
1087
1088 fl::size actualCount = count;
1091 }
1092 fl::size newLen =
mLength - actualCount + count2;
1093
1094
1099 for (fl::size i = 0; i < count2; ++i) newData->data()[
pos + i] = ch;
1100 fl::size remainingLen =
mLength -
pos - actualCount;
1101 if (remainingLen > 0) {
1102 fl::memcpy(newData->data() +
pos + count2, heap->data() +
pos + actualCount, remainingLen);
1103 }
1104 newData->data()[newLen] = '\0';
1107 return *this;
1108 }
1109
1110
1112 if (count2 != actualCount) {
1113 fl::size remainingLen =
mLength -
pos - actualCount;
1114 if (remainingLen > 0) {
1116 }
1117 }
1121 return *this;
1122 }
1123
1124
1126 if (canReplaceInPlace) {
1128 canReplaceInPlace = heap.get().use_count() <= 1 && heap->hasCapacity(newLen);
1129 if (canReplaceInPlace) {
1130 char*
data = heap->data();
1131 if (count2 != actualCount) {
1132 fl::size remainingLen =
mLength -
pos - actualCount;
1133 if (remainingLen > 0) {
1135 }
1136 }
1137 for (fl::size i = 0; i < count2; ++i)
data[
pos + i] = ch;
1140 }
1141 }
1142 if (!canReplaceInPlace) {
1144 const char* src =
c_str();
1146 for (fl::size i = 0; i < count2; ++i) newData->data()[
pos + i] = ch;
1147 fl::size remainingLen =
mLength -
pos - actualCount;
1148 if (remainingLen > 0) {
1149 fl::memcpy(newData->data() +
pos + count2, src +
pos + actualCount, remainingLen);
1150 }
1151 newData->data()[newLen] = '\0';
1154 }
1155 return *this;
1156}
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
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