MCPcopy Create free account
hub / github.com/OSGeo/gdal / PercentEncode

Function PercentEncode

apps/gdalalg_vector_partition.cpp:237–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235/************************************************************************/
236
237static void PercentEncode(std::string &out, const std::string_view &s)
238{
239 for (unsigned char c : s)
240 {
241 if (c > 32 && c <= 127 && c != ':' && c != '/' && c != '\\' &&
242 c != '>' && c != '%' && c != '=')
243 {
244 out += c;
245 }
246 else
247 {
248 out += CPLSPrintf("%%%02X", c);
249 }
250 }
251}
252
253static std::string PercentEncode(const std::string_view &s)
254{

Callers 2

GetCurrentOutputLayerFunction · 0.85
RunStepMethod · 0.85

Calls 1

CPLSPrintfFunction · 0.85

Tested by

no test coverage detected