diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-04-22 12:48:30 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-04-22 12:48:30 +0000 |
commit | 560d8dba3b98b2a5ae65da01b5021757eb366888 (patch) | |
tree | 2b947a42f03be862b6fa1a45ce1e95723cee0ac1 /pjlib/include/pj/string.h | |
parent | 44d9c946fc77600985b869552887497c2a539d5c (diff) |
Merged changes from the trunk
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/split-3rd-party@1210 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/string.h')
-rw-r--r-- | pjlib/include/pj/string.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pjlib/include/pj/string.h b/pjlib/include/pj/string.h index 1a75a402..26e7fa6c 100644 --- a/pjlib/include/pj/string.h +++ b/pjlib/include/pj/string.h @@ -518,6 +518,23 @@ PJ_DECL(char*) pj_create_random_string(char *str, pj_size_t length); PJ_DECL(unsigned long) pj_strtoul(const pj_str_t *str); /** + * Convert strings to an unsigned long-integer value. + * This function stops reading the string input either when the number + * of characters has exceeded the length of the input or it has read + * the first character it cannot recognize as part of a number, that is + * a character greater than or equal to base. + * + * @param str The input string. + * @param endptr Optional pointer to receive the remainder/unparsed + * portion of the input. + * @param base Number base to use. + * + * @return the unsigned integer number. + */ +PJ_DECL(unsigned long) pj_strtoul2(const pj_str_t *str, pj_str_t *endptr, + unsigned base); + +/** * Utility to convert unsigned integer to string. Note that the * string will be NULL terminated. * |