MCPcopy Create free account
hub / github.com/Kitware/CMake / DecodeURL

Method DecodeURL

Source/cmCTest.cxx:298–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298std::string cmCTest::DecodeURL(std::string const& in)
299{
300 std::string out;
301 for (char const* c = in.c_str(); *c; ++c) {
302 if (*c == '%' && cmsysString_isxdigit(*(c + 1)) &&
303 cmsysString_isxdigit(*(c + 2))) {
304 char buf[3] = { *(c + 1), *(c + 2), 0 };
305 out.append(1, static_cast<char>(strtoul(buf, nullptr, 16)));
306 c += 2;
307 } else {
308 out.append(1, *c);
309 }
310 }
311 return out;
312}
313
314cmCTest::cmCTest()
315 : Impl(cm::make_unique<Private>(this))

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected