| 45 | }; |
| 46 | |
| 47 | class TFromHexLenLimited { |
| 48 | public: |
| 49 | explicit TFromHexLenLimited(const char* end) |
| 50 | : End(end) |
| 51 | { |
| 52 | } |
| 53 | |
| 54 | inline char x2c(const char*& x) { |
| 55 | if (x + 2 > End) |
| 56 | return '%'; |
| 57 | return TFromHexZeroTerm::x2c(x); |
| 58 | } |
| 59 | |
| 60 | private: |
| 61 | const char* End; |
| 62 | }; |
| 63 | } |
| 64 | |
| 65 | static inline char d2x(unsigned x) { |