MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / push_back

Method push_back

include/stringzilla/stringzilla.hpp:3891–3894  ·  view source on GitHub ↗

* @brief Appends the given character at the end. * @throw `std::length_error` if the string is too long. * @throw `std::bad_alloc` if the allocation fails. */

Source from the content-addressed store, hash-verified

3889 * @throw `std::bad_alloc` if the allocation fails.
3890 */
3891 void push_back(char_type ch) noexcept(false) {
3892 if (size() == max_size()) throw std::length_error("string::push_back");
3893 if (!try_push_back(ch)) throw std::bad_alloc();
3894 }
3895
3896 /**
3897 * @brief Removes the last character from the string.

Callers 13

test_utf8_case_fold_fuzzFunction · 0.80
scope_assertFunction · 0.80
test_updatesFunction · 0.80
filter_by_lengthFunction · 0.80
build_environmentFunction · 0.80
toMethod · 0.80
toMethod · 0.80
toMethod · 0.80
toMethod · 0.80
toMethod · 0.80
toMethod · 0.80

Calls

no outgoing calls

Tested by 3

test_utf8_case_fold_fuzzFunction · 0.64
scope_assertFunction · 0.64
test_updatesFunction · 0.64