-rw-r--r-- | include/opkele/util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/opkele/util.h b/include/opkele/util.h index 6f3ddf6..719f951 100644 --- a/include/opkele/util.h +++ b/include/opkele/util.h | |||
@@ -87,32 +87,39 @@ namespace opkele { | |||
87 | * Convert W3C time representation to internal time_t | 87 | * Convert W3C time representation to internal time_t |
88 | * @param w w3c representation | 88 | * @param w w3c representation |
89 | * @return converted time | 89 | * @return converted time |
90 | * @throw failed_conversion in case of error | 90 | * @throw failed_conversion in case of error |
91 | */ | 91 | */ |
92 | time_t w3c_to_time(const string& w); | 92 | time_t w3c_to_time(const string& w); |
93 | 93 | ||
94 | /** | 94 | /** |
95 | * Encode string to the representation suitable for using in URL. | 95 | * Encode string to the representation suitable for using in URL. |
96 | * @param str string to encode | 96 | * @param str string to encode |
97 | * @return encoded string | 97 | * @return encoded string |
98 | * @throw failed_conversion in case of failure | 98 | * @throw failed_conversion in case of failure |
99 | */ | 99 | */ |
100 | string url_encode(const string& str); | 100 | string url_encode(const string& str); |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * Make string suitable for using as x(ht)ml attribute. | ||
104 | * @param str string to escape | ||
105 | * @return escaped string | ||
106 | */ | ||
107 | string attr_escape(const string& str); | ||
108 | |||
109 | /** | ||
103 | * Convert number to string | 110 | * Convert number to string |
104 | * @param l number | 111 | * @param l number |
105 | * @return string representation | 112 | * @return string representation |
106 | * @throw failed_conversion in case of failure | 113 | * @throw failed_conversion in case of failure |
107 | */ | 114 | */ |
108 | string long_to_string(long l); | 115 | string long_to_string(long l); |
109 | /** | 116 | /** |
110 | * Convert string to number | 117 | * Convert string to number |
111 | * @param s string, containing the number | 118 | * @param s string, containing the number |
112 | * @return the number | 119 | * @return the number |
113 | * @throw failed_conversion in case of failure | 120 | * @throw failed_conversion in case of failure |
114 | */ | 121 | */ |
115 | long string_to_long(const string& s); | 122 | long string_to_long(const string& s); |
116 | 123 | ||
117 | /** | 124 | /** |
118 | * Encode binary data using base64. | 125 | * Encode binary data using base64. |