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

Method init

include/stringzilla/stringzilla.hpp:2688–2694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2686 }
2687
2688 void init(std::size_t length, char_type value) noexcept(false) {
2689 sz_ptr_t start;
2690 raise(_with_alloc([&](sz_alloc_type &alloc) {
2691 return (start = sz_string_init_length(&string_, length, &alloc)) ? sz_success_k : sz_bad_alloc_k;
2692 }));
2693 sz_fill(start, length, sz_bitcast_(sz_u8_t, value));
2694 }
2695
2696 void init(string_view other) noexcept(false) {
2697 sz_ptr_t start;

Callers

nothing calls this directly

Calls 7

raiseFunction · 0.85
_with_allocFunction · 0.85
sz_string_init_lengthFunction · 0.85
sz_fillFunction · 0.70
sz_copyFunction · 0.70
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected