MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / UrlEncode

Function UrlEncode

http.cpp:136–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134
135
136 string UrlEncode(const string& str)
137 {
138 string outStr;
139 outStr.reserve(str.size());
140 for (auto& ch : str)
141 {
142 if (isalnum(ch))
143 {
144 outStr += ch;
145 }
146 else
147 {
148 char buf[8];
149 snprintf(buf, 8, "%%%02hhx", ch);
150 outStr += string(buf);
151 }
152 }
153 return outStr;
154 }
155
156
157 string UrlEncode(const vector<pair<string, string>>& fields)

Callers 1

RequestMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected