diff options
author | David Tolnay <dtolnay@gmail.com> | 2021-08-27 12:52:54 -0700 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2021-08-27 13:33:38 -0700 |
commit | 6f3f4bb7ee2e42d8bb10d3a963cd4b0b5f1733c8 (patch) | |
tree | 2e006139377f982ee64bc5dbdee715d8b336915f /src/cxx.cc | |
parent | 800d98989532e519d422b94544e1421c9cb73006 (diff) | |
download | cxx-6f3f4bb7ee2e42d8bb10d3a963cd4b0b5f1733c8.tar.gz |
Expose reserve on CxxString
Diffstat (limited to 'src/cxx.cc')
-rw-r--r-- | src/cxx.cc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -24,6 +24,11 @@ std::size_t cxxbridge1$cxx_string$length(const std::string &s) noexcept { void cxxbridge1$cxx_string$clear(std::string &s) noexcept { s.clear(); } +void cxxbridge1$cxx_string$reserve_total(std::string &s, + size_t new_cap) noexcept { + s.reserve(new_cap); +} + void cxxbridge1$cxx_string$push(std::string &s, const std::uint8_t *ptr, std::size_t len) noexcept { s.append(reinterpret_cast<const char *>(ptr), len); |