MCPcopy Create free account
hub / github.com/apache/brpc / WriteInto

Function WriteInto

src/butil/strings/string_util.h:460–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458// to this function (probably 0).
459template <class string_type>
460inline typename string_type::value_type* WriteInto(string_type* str,
461 size_t length_with_null) {
462 DCHECK_GT(length_with_null, 1u);
463 str->reserve(length_with_null);
464 str->resize(length_with_null - 1);
465 return &((*str)[0]);
466}
467
468//-----------------------------------------------------------------------------
469

Callers 4

WritesCorrectlyMethod · 0.85
TEST_FFunction · 0.85
TESTFunction · 0.85
RandBytesAsStringFunction · 0.85

Calls 2

reserveMethod · 0.45
resizeMethod · 0.45

Tested by 3

WritesCorrectlyMethod · 0.68
TEST_FFunction · 0.68
TESTFunction · 0.68