| 103 | |
| 104 | template <class It1, class It2, class It3> |
| 105 | static inline It1 Escape(It1 to, It2 from, It3 end, const bool* escape_map = chars_to_url_escape) { |
| 106 | while (from != end) { |
| 107 | if (escape_map[(unsigned char)*from]) { |
| 108 | *to++ = '%'; |
| 109 | *to++ = d2x((unsigned char)*from >> 4); |
| 110 | *to++ = d2x((unsigned char)*from & 0xF); |
| 111 | } else { |
| 112 | *to++ = (*from == ' ' ? '+' : *from); |
| 113 | } |
| 114 | |
| 115 | ++from; |
| 116 | } |
| 117 | |
| 118 | *to = 0; |
| 119 | |
| 120 | return to; |
| 121 | } |
| 122 | |
| 123 | template <class It1, class It2, class It3, class FromHex> |
| 124 | static inline It1 Unescape(It1 to, It2 from, It3 end, FromHex fromHex) { |
no test coverage detected