diff options
author | Joe Orton <jorton@apache.org> | 2004-05-24 09:33:27 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2004-05-24 09:33:27 +0000 |
commit | 90105ae4fdecbe640358b65f6147780cc8ffc102 (patch) | |
tree | 3fb1cc72bb6ee54bba3d7600e3f7251593e72134 /include/apr_strings.h | |
parent | 65cb7376d568fb285a71415166535e61c5c14461 (diff) | |
download | apr-90105ae4fdecbe640358b65f6147780cc8ffc102.tar.gz |
* configure.in, include/arch/win32/apr_private.h,
include/arch/netware/apr_private.h: Define APR_OFF_T_STRFN.
* include/apr_strings.h, strings/apr_strings.c: Add apr_strtoff()
function.
* test/teststr.c (string_strtoff): Add test.
Submitted by: Andr�� Malo, Joe Orton
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65120 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_strings.h')
-rw-r--r-- | include/apr_strings.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/apr_strings.h b/include/apr_strings.h index 7934ff6cd..c189cb6a4 100644 --- a/include/apr_strings.h +++ b/include/apr_strings.h @@ -296,6 +296,23 @@ APR_DECLARE(char *) apr_ltoa(apr_pool_t *p, long n); APR_DECLARE(char *) apr_off_t_toa(apr_pool_t *p, apr_off_t n); /** + * Convert a numeric string into an apr_off_t numeric value. + * @param offset The value of the parsed string. + * @param buf The string to parse. It may contain optional whitespace, + * followed by an optional '+' (positive, default) or '-' (negative) + * character, followed by an optional '0x' prefix if base is 0 or 16, + * followed by numeric digits appropriate for base. + * @param end A pointer to the end of the valid character in buf. If + * not NULL, it is set to the first invalid character in buf. + * @param base A numeric base in the range between 2 and 36 inclusive, + * or 0. If base is zero, buf will be treated as base ten unless its + * digits are prefixed with '0x', in which case it will be treated as + * base 16. + */ +APR_DECLARE(apr_status_t) apr_strtoff(apr_off_t *offset, const char *buf, + char **end, int base); + +/** * parse a numeric string into a 64-bit numeric value * @param buf The string to parse. It may contain optional whitespace, * followed by an optional '+' (positive, default) or '-' (negative) |