summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/string.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-04-15 09:58:48 +0000
committerBenny Prijono <bennylp@teluu.com>2007-04-15 09:58:48 +0000
commit0c6f9521feba68026a227aebef97fbe440c44e80 (patch)
treeb37206b3ac916138e0fc1deb7ddb6aed87cc659c /pjlib/include/pj/string.h
parent5c2c87c522aae8a66100e0a05a151e2f778061d1 (diff)
Ticket #223: Added pj_strtoul2()
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1194 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/string.h')
-rw-r--r--pjlib/include/pj/string.h17
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.
*