MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / encode

Function encode

common/script/httpcall.cpp:228–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 }
227
228 std::string encode(const char* s)
229 {
230 CURL* curl = curlReady() ? curl_easy_init() : nullptr;
231 if (!curl) {
232 return std::string();
233 }
234 char* enc = curl_easy_escape(curl, s ? s : "", 0);
235 std::string out;
236 if (enc) {
237 try {
238 out.assign(enc);
239 }
240 catch (...) {
241 out.clear();
242 }
243 curl_free(enc);
244 }
245 curl_easy_cleanup(curl);
246 return out;
247 }
248
249 const char* strerror(int code)
250 {

Callers 2

exportTitleListCacheMethod · 0.85
ckpt_url_encodeFunction · 0.85

Calls 3

curlReadyFunction · 0.85
stringFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected