MCPcopy Create free account
hub / github.com/boostorg/json / grow

Method grow

include/boost/json/string.hpp:1691–1697  ·  view source on GitHub ↗

Increase size without changing capacity. This increases the size of the string by `n` characters, adjusting the position of the terminating null character for the new size. The new characters remain uninitialized. This function may be used to append characters directly into the storage between @ref end() and @ref data() ` + ` @ref capacity(). @pre

Source from the content-addressed store, hash-verified

1689 @param n The amount to increase the size by.
1690 */
1691 void
1692 grow(std::size_t n) noexcept
1693 {
1694 BOOST_ASSERT(
1695 n <= impl_.capacity() - impl_.size());
1696 impl_.term(impl_.size() + n);
1697 }
1698
1699 /** Swap the contents.
1700

Callers 6

greetingFunction · 0.45
grind_oneMethod · 0.45
grindMethod · 0.45
serialize_stringMethod · 0.45
serializeMethod · 0.45
operator()Method · 0.45

Calls 3

termMethod · 0.80
capacityMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected