aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_str.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_str.h')
-rw-r--r--src/microhttpd/mhd_str.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_str.h b/src/microhttpd/mhd_str.h
index 6975d6b8..22d09cff 100644
--- a/src/microhttpd/mhd_str.h
+++ b/src/microhttpd/mhd_str.h
@@ -60,4 +60,39 @@ MHD_str_equal_caseless_n_ (const char * const str1,
60 const char * const str2, 60 const char * const str2,
61 size_t maxlen); 61 size_t maxlen);
62 62
63/**
64 * Convert decimal US-ASCII digits in string to number in uint64_t.
65 * Conversion stopped at first non-digit character.
66 * @param str string to convert
67 * @param out_val pointer to uint64_t to store result of conversion
68 * @param next_char pointer to store pointer to character next to last
69 * converted digit, ignored if NULL
70 * @return non-zero if conversion succeed; zero if no digit is found,
71 * value is larger then possible to store in uint64_t or
72 * @a out_val is NULL
73 */
74int
75MHD_str_to_uint64_ (const char * str,
76 uint64_t * out_val,
77 const char ** next_char);
78
79/**
80 * Convert not more then @a maxlen decimal US-ASCII digits in string to
81 * number in uint64_t.
82 * Conversion stopped at first non-digit character or after @a maxlen
83 * digits.
84 * @param str string to convert
85 * @param out_val pointer to uint64_t to store result of conversion
86 * @param next_char pointer to store pointer to character next to last
87 * converted digit, ignored if NULL
88 * @return non-zero if conversion succeed; zero if no digit is found,
89 * value is larger then possible to store in uint64_t or
90 * @a out_val is NULL
91 */
92int
93MHD_str_to_uint64_n_ (const char * str,
94 size_t maxlen,
95 uint64_t * out_val,
96 const char ** next_char);
97
63#endif /* MHD_STR_H */ 98#endif /* MHD_STR_H */