Mercurial > trustbridge
comparison common/strhelp.h @ 188:a3bde2aaabd9
merged.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 26 Mar 2014 09:12:10 +0100 |
parents | 1f44aae4528e |
children | 6b4ad6ccc48e |
comparison
equal
deleted
inserted
replaced
187:0c06a608e15f | 188:a3bde2aaabd9 |
---|---|
1 #ifndef STRHELP_H | 1 #ifndef STRHELP_H |
2 #define STRHELP_H | 2 #define STRHELP_H |
3 | |
4 #ifdef __cplusplus | |
5 extern "C" { | |
6 #endif | |
3 | 7 |
4 #include <stdbool.h> | 8 #include <stdbool.h> |
5 | 9 |
6 /** | 10 /** |
7 * @file strhelp.h | 11 * @file strhelp.h |
73 * first character after the last non white space character to \0. | 77 * first character after the last non white space character to \0. |
74 * @param[inout] s ponter to the string to strip | 78 * @param[inout] s ponter to the string to strip |
75 */ | 79 */ |
76 bool str_trim (char **s); | 80 bool str_trim (char **s); |
77 | 81 |
82 /** @brief decode base64 encoded data | |
83 * | |
84 * The memory allocated for dest needs to be free'd by the | |
85 * caller. | |
86 * | |
87 * @param [out] dst Pointer to the destination. Needs to be NULL | |
88 * @param [out] dst_size Size allocated for the destination. | |
89 * @param [in] src Pointer to the base64 encoded data. | |
90 * @param [in] src_size Size of the encoded data. | |
91 * | |
92 * @returns 0 on success a polarssl error or -1 otherwise | |
93 */ | |
94 int str_base64_decode(char **dst, size_t *dst_size, char *src, | |
95 size_t src_size); | |
96 #ifdef __cplusplus | |
97 } | |
78 #endif | 98 #endif |
99 | |
100 #endif |