MCPcopy Create free account
hub / github.com/MediaArea/MediaInfoLib / PercentEncode

Function PercentEncode

Source/MediaInfo/Reader/Reader_libcurl.cpp:222–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 In+=(char)((l>=10?'A'-10:'0')+l);
221}
222string PercentEncode(const string& In)
223{
224 string Result;
225 for (string::size_type i=0; i<In.size(); i++)
226 {
227 char C=In[i];
228 if ((C>='0' && C<='9')
229 || (C>='A' && C<='Z')
230 || (C>='a' && C<='z')
231 || C=='/' // Directory separator
232 || C=='-'
233 || C=='.'
234 || C=='_'
235 || C=='~')
236 Result+=In[i];
237 else
238 PercentEncode_Add(Result, C);
239 }
240 return Result;
241}
242string PercentDecode(const string& In)
243{
244 string Result;

Callers 1

Format_Test_PerParserMethod · 0.85

Calls 2

PercentEncode_AddFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected