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

Method capacity

include/stringzilla/stringzilla.hpp:2936–2943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2934 size_type max_size() const noexcept { return npos - 1; }
2935 bool empty() const noexcept { return sz_string_length(&string_) == 0; }
2936 size_type capacity() const noexcept {
2937 sz_ptr_t string_start;
2938 sz_size_t string_length;
2939 sz_size_t string_space;
2940 sz_bool_t string_is_external;
2941 sz_string_unpack(&string_, &string_start, &string_length, &string_space, &string_is_external);
2942 return string_space - 1;
2943 }
2944
2945 allocator_type get_allocator() const noexcept { return {}; }
2946

Callers

nothing calls this directly

Calls 1

sz_string_unpackFunction · 0.85

Tested by

no test coverage detected