MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / AppendPieces

Function AppendPieces

include/behaviortree_cpp/utils/strcat.hpp:22–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20{
21
22inline void AppendPieces(std::string* dest,
23 std::initializer_list<std::string_view> pieces)
24{
25 size_t size = 0;
26 for(const auto& piece : pieces)
27 {
28 size += piece.size();
29 }
30 dest->reserve(dest->size() + size);
31 for(const auto& piece : pieces)
32 {
33 dest->append(piece.data(), piece.size());
34 }
35}
36
37inline std::string CatPieces(std::initializer_list<std::string_view> pieces)
38{

Callers 2

CatPiecesFunction · 0.85
StrAppendFunction · 0.85

Calls 3

appendMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected