summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/string.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2005-11-21 17:01:50 +0000
committerBenny Prijono <bennylp@teluu.com>2005-11-21 17:01:50 +0000
commit5721450040bd1b09af00123679577ff190da006b (patch)
tree9c330a924d04c12e180c13625dc0937e6f3d5558 /pjlib/include/pj/string.h
parent0f263784356feca86786c2d2ade9eedf2f41a236 (diff)
Added pj_stricmp_alnum() to speedup the parser!!!
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@72 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/string.h')
-rw-r--r--pjlib/include/pj/string.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/pjlib/include/pj/string.h b/pjlib/include/pj/string.h
index c7310b59..83f6ab73 100644
--- a/pjlib/include/pj/string.h
+++ b/pjlib/include/pj/string.h
@@ -334,10 +334,28 @@ PJ_IDECL(int) pj_strncmp2( const pj_str_t *str1, const char *str2,
*
* @return
* - < 0 if str1 is less than str2
- * - 0 if str1 is identical to str2
+ * - 0 if str1 is equal to str2
* - > 0 if str1 is greater than str2
*/
-PJ_IDECL(int) pj_stricmp( const pj_str_t *str1, const pj_str_t *str2);
+PJ_IDECL(int) pj_stricmp(const pj_str_t *str1, const pj_str_t *str2);
+
+/**
+ * Perform lowercase comparison to the strings which consists of only
+ * alnum characters. More over, it will only return non-zero if both
+ * strings are not equal, and is not able to detect which string is
+ * 'less'.
+ *
+ * If non-alnum inputs are given, then the function may mistakenly
+ * treat two strings as equal while they're not.
+ *
+ * @param str1 The string to compare.
+ * @param str2 The string to compare.
+ *
+ * @return
+ * - 0 if str1 is equal to str2
+ * - (-1) if not equal.
+ */
+PJ_IDECL(int) pj_stricmp_alnum(const pj_str_t *str1, const pj_str_t *str2);
/**
* Perform lowercase comparison to the strings.