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

Function CopyToStringT

src/butil/strings/string_piece.cc:54–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53template<typename STR>
54void CopyToStringT(const BasicStringPiece<STR>& self, STR* target) {
55 if (self.empty())
56 target->clear();
57 else
58 target->assign(self.data(), self.size());
59}
60
61void CopyToString(const StringPiece& self, std::string* target) {
62 CopyToStringT(self, target);

Callers 1

CopyToStringFunction · 0.85

Calls 5

emptyMethod · 0.45
clearMethod · 0.45
assignMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected