Summary:
Contrary to the other `append` flavors, `fbstring::append(size_type n, value_type c)`
does not use exponential growth, which can trigger quadratic behavior.
Reviewed By: philippv
Differential Revision:
D3357315
fbshipit-source-id:
2301ed1a9953544368663107113890a25c6621ae
}
basic_fbstring& append(size_type n, value_type c) {
- resize(size() + n, c);
+ Invariant checker(*this);
+ auto pData = store_.expand_noinit(n, /* expGrowth = */ true);
+ fbstring_detail::pod_fill(pData, pData + n, c);
return *this;
}