MCPcopy Create free account
hub / github.com/defold/defold / IsUnreserved

Function IsUnreserved

engine/dlib/src/dlib/uri.cpp:109–128  ·  view source on GitHub ↗

http://en.wikipedia.org/wiki/Percent-encoding

Source from the content-addressed store, hash-verified

107
108 // http://en.wikipedia.org/wiki/Percent-encoding
109 static bool IsUnreserved(char c)
110 {
111 if (c >= 'a' && c <= 'z') {
112 return true;
113 } else if (c >= 'A' && c <= 'Z') {
114 return true;
115 } else if (c >= '0' && c <= '9') {
116 return true;
117 } else {
118 switch (c) {
119 case '-':
120 case '_':
121 case '.':
122 case '~':
123 case '/':
124 return true;
125 }
126 }
127 return false;
128 }
129
130 Result Encode(const char* src, char* dst, uint32_t dst_len, uint32_t* bytes_written)
131 {

Callers 1

EncodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected