MCPcopy Create free account
hub / github.com/catboost/catboost / Unescape

Function Unescape

library/cpp/string_utils/quote/quote.cpp:124–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122
123template <class It1, class It2, class It3, class FromHex>
124static inline It1 Unescape(It1 to, It2 from, It3 end, FromHex fromHex) {
125 (void)fromHex;
126
127 while (from != end) {
128 switch (*from) {
129 case '%':
130 ++from;
131 *to++ = fromHex.x2c(from);
132 break;
133 case '+':
134 *to++ = ' ';
135 ++from;
136 break;
137 default:
138 *to++ = *from++;
139 }
140 }
141 *to = 0;
142 return to;
143}
144
145// CGIEscape returns pointer to the end of the result string
146// so as it could be possible to populate single long buffer

Callers 1

CGIUnescapeFunction · 0.70

Calls 1

x2cMethod · 0.45

Tested by

no test coverage detected