FastLED 3.9.15
Loading...
Searching...
No Matches

◆ resize() [2/2]

void fl::basic_string::resize ( fl::size count,
char ch )

Definition at line 1437 of file basic_string.cpp.hpp.

1437 {
1438 if (count < mLength) {
1439 mLength = count;
1440 c_str_mutable()[mLength] = '\0';
1441 } else if (count > mLength) {
1442 fl::size additional_chars = count - mLength;
1443 reserve(count);
1444 char* data_ptr = c_str_mutable();
1445 for (fl::size i = 0; i < additional_chars; ++i) {
1446 data_ptr[mLength + i] = ch;
1447 }
1448 mLength = count;
1449 data_ptr[mLength] = '\0';
1450 }
1451}
void reserve(fl::size newCapacity) FL_NOEXCEPT
char * c_str_mutable() FL_NOEXCEPT

References c_str_mutable(), mLength, and reserve().

+ Here is the call graph for this function: