MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / parse_query_text

Function parse_query_text

dependencies/httplib/httplib.h:3691–3712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3689}
3690
3691inline void parse_query_text(const std::string &s, Params &params) {
3692 std::set<std::string> cache;
3693 split(s.data(), s.data() + s.size(), '&', [&](const char *b, const char *e) {
3694 std::string kv(b, e);
3695 if (cache.find(kv) != cache.end()) { return; }
3696 cache.insert(kv);
3697
3698 std::string key;
3699 std::string val;
3700 split(b, e, '=', [&](const char *b2, const char *e2) {
3701 if (key.empty()) {
3702 key.assign(b2, e2);
3703 } else {
3704 val.assign(b2, e2);
3705 }
3706 });
3707
3708 if (!key.empty()) {
3709 params.emplace(decode_url(key, true), decode_url(val, true));
3710 }
3711 });
3712}
3713
3714inline bool parse_multipart_boundary(const std::string &content_type,
3715 std::string &boundary) {

Callers 2

parse_request_lineMethod · 0.85
read_contentMethod · 0.85

Calls 9

decode_urlFunction · 0.85
dataMethod · 0.80
splitFunction · 0.70
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
emptyMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected