MCPcopy Create free account
hub / github.com/chen3feng/toft / AppendToString

Method AppendToString

net/uri/query_params.cpp:51–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void QueryParams::AppendToString(std::string* target) const
52{
53 for (size_t i = 0; i < m_params.size(); ++i)
54 {
55 if (!m_params[i].name.empty())
56 {
57 const QueryParam& param = m_params[i];
58 target->append(param.name);
59 target->push_back('=');
60 target->append(PercentEncoding::Encode(param.value));
61 if (i != m_params.size() - 1)
62 target->push_back('&');
63 }
64 }
65}
66
67void QueryParams::WriteToString(std::string* target) const
68{

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected