Change size.
Synopsis
Declared in <folly/json/dynamic.h>
void
resize(
std::size_t sz,
dynamic const& defaultVal = nullptr);
Description
Resizes an array so it has at n elements, using the supplied default to fill new elements. Throws TypeError if this dynamic is not an array.
May invalidate iterators.
Post: size() == n
methodset Array
Parameters
Name |
Description |
sz |
The new number of elements. |
defaultVal |
The value used to fill any newly added elements. |
Created with MrDocs