finally removes the underscore of ugliness from ucx_str_cmp() and ucx_str_casecmp()

Mon, 14 May 2018 18:27:23 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 14 May 2018 18:27:23 +0200
changeset 315
5b97de37aada
parent 314
5d28dc8f0765
child 316
be0f6bd10b52

finally removes the underscore of ugliness from ucx_str_cmp() and ucx_str_casecmp()

src/string.c file | annotate | diff | comparison | revisions
src/ucx/string.h file | annotate | diff | comparison | revisions
--- a/src/string.c	Mon May 14 18:25:20 2018 +0200
+++ b/src/string.c	Mon May 14 18:27:23 2018 +0200
@@ -487,7 +487,7 @@
     return result;
 }
 
-int ucx_str_cmp(scstr_t s1, scstr_t s2) {
+int ucx_strcmp(scstr_t s1, scstr_t s2) {
     if (s1.length == s2.length) {
         return memcmp(s1.ptr, s2.ptr, s1.length);
     } else if (s1.length > s2.length) {
@@ -497,7 +497,7 @@
     }
 }
 
-int ucx_str_casecmp(scstr_t s1, scstr_t s2) {
+int ucx_strcasecmp(scstr_t s1, scstr_t s2) {
     if (s1.length == s2.length) {
 #ifdef _WIN32
         return _strnicmp(s1.ptr, s2.ptr, s1.length);
--- a/src/ucx/string.h	Mon May 14 18:25:20 2018 +0200
+++ b/src/ucx/string.h	Mon May 14 18:27:23 2018 +0200
@@ -403,9 +403,9 @@
  * length of s1 is greater than the length of s2 or the result of
  * <code>memcmp()</code> otherwise (i.e. 0 if the strings match)
  */
-int ucx_str_cmp(scstr_t s1, scstr_t s2);
+int ucx_strcmp(scstr_t s1, scstr_t s2);
 
-#define sstrcmp(s1, s2) ucx_str_cmp(SCSTR(s1), SCSTR(s2))
+#define sstrcmp(s1, s2) ucx_strcmp(SCSTR(s1), SCSTR(s2))
 
 /**
  * Compares two UCX strings ignoring the case.
@@ -421,9 +421,9 @@
  * first two differing characters otherwise (i.e. 0 if the strings match and
  * no characters differ)
  */
-int ucx_str_casecmp(scstr_t s1, scstr_t s2);
+int ucx_strcasecmp(scstr_t s1, scstr_t s2);
 
-#define sstrcasecmp(s1, s2) ucx_str_casecmp(SCSTR(s1), SCSTR(s2))
+#define sstrcasecmp(s1, s2) ucx_strcasecmp(SCSTR(s1), SCSTR(s2))
 
 /**
  * Creates a duplicate of the specified string.

mercurial