author | Michael Krelin <hacker@klever.net> | 2008-03-02 23:52:14 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-03-02 23:52:14 (UTC) |
commit | 5fd5ecad8c2bd1e8846c11fa9b281f0f4ab8a4a7 (patch) (unidiff) | |
tree | 76ba24c589d0ce7de6cab113787cf7a70572f994 /include | |
parent | f6482fb9003e4953f838ba4ef2c110190355622f (diff) | |
download | libopkele-5fd5ecad8c2bd1e8846c11fa9b281f0f4ab8a4a7.zip libopkele-5fd5ecad8c2bd1e8846c11fa9b281f0f4ab8a4a7.tar.gz libopkele-5fd5ecad8c2bd1e8846c11fa9b281f0f4ab8a4a7.tar.bz2 |
aded util::url_decode()
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/util.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/opkele/util.h b/include/opkele/util.h index fd974a1..0130bff 100644 --- a/include/opkele/util.h +++ b/include/opkele/util.h | |||
@@ -22,32 +22,40 @@ namespace opkele { | |||
22 | * @throw failed_conversion in case of error | 22 | * @throw failed_conversion in case of error |
23 | */ | 23 | */ |
24 | string time_to_w3c(time_t t); | 24 | string time_to_w3c(time_t t); |
25 | /** | 25 | /** |
26 | * Convert W3C time representation to internal time_t | 26 | * Convert W3C time representation to internal time_t |
27 | * @param w w3c representation | 27 | * @param w w3c representation |
28 | * @return converted time | 28 | * @return converted time |
29 | * @throw failed_conversion in case of error | 29 | * @throw failed_conversion in case of error |
30 | */ | 30 | */ |
31 | time_t w3c_to_time(const string& w); | 31 | time_t w3c_to_time(const string& w); |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * Encode string to the representation suitable for using in URL. | 34 | * Encode string to the representation suitable for using in URL |
35 | * @param str string to encode | 35 | * @param str string to encode |
36 | * @return encoded string | 36 | * @return encoded string |
37 | * @throw failed_conversion in case of failure | 37 | * @throw failed_conversion in case of failure |
38 | */ | 38 | */ |
39 | string url_encode(const string& str); | 39 | string url_encode(const string& str); |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Decode url-encoded string back to normal | ||
43 | * @param str url-encoded string | ||
44 | * @return decoded string | ||
45 | * @throw failed_conversion in case of failure | ||
46 | */ | ||
47 | string url_decode(const string& str); | ||
48 | |||
49 | /** | ||
42 | * Make string suitable for using as x(ht)ml attribute. | 50 | * Make string suitable for using as x(ht)ml attribute. |
43 | * @param str string to escape | 51 | * @param str string to escape |
44 | * @return escaped string | 52 | * @return escaped string |
45 | */ | 53 | */ |
46 | string attr_escape(const string& str); | 54 | string attr_escape(const string& str); |
47 | 55 | ||
48 | /** | 56 | /** |
49 | * Convert number to string | 57 | * Convert number to string |
50 | * @param l number | 58 | * @param l number |
51 | * @return string representation | 59 | * @return string representation |
52 | * @throw failed_conversion in case of failure | 60 | * @throw failed_conversion in case of failure |
53 | */ | 61 | */ |