DCL 3.7.4
Loading...
Searching...
No Matches
URLDecoder Class Reference

#include <URI.h>

Static Public Member Functions

static ByteString decode (const char *_begin, const char *_end)
static ByteString decode (const ByteString &_str)
static String decode (const String &_str)

Detailed Description

Definition at line 18 of file URI.h.

Member Function Documentation

◆ decode() [1/3]

ByteString URLDecoder::decode ( const ByteString & _str)
static

Definition at line 68 of file URI.cpp.

69{
70 return URLDecoder::decode(_str, _str.data() + _str.length());
71}
static ByteString decode(const char *_begin, const char *_end)
Definition URI.cpp:46

◆ decode() [2/3]

ByteString URLDecoder::decode ( const char * _begin,
const char * _end )
static

Definition at line 46 of file URI.cpp.

47{
48 ByteStringBuilder r;
49 while (_begin < _end) {
50 if (*_begin == '+')
51 r += ' ';
52 else if (
53 *_begin == '%'
54 && (_begin + 2) < _end
55 && isxdigit(*(_begin +1))
56 && isxdigit(*(_begin + 2))
57 ) {
58 r += (char)hextoi(_begin + 1);
59 _begin += 2;
60 }
61 else
62 r += *_begin;
63 _begin++;
64 }
65 return r;
66}
IOException *size_t r
Definition MediaInfo.cpp:82

◆ decode() [3/3]

String URLDecoder::decode ( const String & _str)
static

Definition at line 73 of file URI.cpp.

74{
75 return UTF8Decoder::decode(
77 UTF8Encoder::encode(_str)
78 )
79 );
80}

The documentation for this class was generated from the following files: