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

Function parse_multipart_boundary

dependencies/httplib/httplib.h:3714–3724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3712}
3713
3714inline bool parse_multipart_boundary(const std::string &content_type,
3715 std::string &boundary) {
3716 auto pos = content_type.find("boundary=");
3717 if (pos == std::string::npos) { return false; }
3718 boundary = content_type.substr(pos + 9);
3719 if (boundary.length() >= 2 && boundary.front() == '"' &&
3720 boundary.back() == '"') {
3721 boundary = boundary.substr(1, boundary.size() - 2);
3722 }
3723 return !boundary.empty();
3724}
3725
3726#ifdef CPPHTTPLIB_NO_EXCEPTIONS
3727inline bool parse_range_header(const std::string &s, Ranges &ranges) {

Callers 1

read_content_coreMethod · 0.85

Calls 3

findMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected