Mon, 14 May 2018 18:27:23 +0200
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 |
1.1 --- a/src/string.c Mon May 14 18:25:20 2018 +0200 1.2 +++ b/src/string.c Mon May 14 18:27:23 2018 +0200 1.3 @@ -487,7 +487,7 @@ 1.4 return result; 1.5 } 1.6 1.7 -int ucx_str_cmp(scstr_t s1, scstr_t s2) { 1.8 +int ucx_strcmp(scstr_t s1, scstr_t s2) { 1.9 if (s1.length == s2.length) { 1.10 return memcmp(s1.ptr, s2.ptr, s1.length); 1.11 } else if (s1.length > s2.length) { 1.12 @@ -497,7 +497,7 @@ 1.13 } 1.14 } 1.15 1.16 -int ucx_str_casecmp(scstr_t s1, scstr_t s2) { 1.17 +int ucx_strcasecmp(scstr_t s1, scstr_t s2) { 1.18 if (s1.length == s2.length) { 1.19 #ifdef _WIN32 1.20 return _strnicmp(s1.ptr, s2.ptr, s1.length);
2.1 --- a/src/ucx/string.h Mon May 14 18:25:20 2018 +0200 2.2 +++ b/src/ucx/string.h Mon May 14 18:27:23 2018 +0200 2.3 @@ -403,9 +403,9 @@ 2.4 * length of s1 is greater than the length of s2 or the result of 2.5 * <code>memcmp()</code> otherwise (i.e. 0 if the strings match) 2.6 */ 2.7 -int ucx_str_cmp(scstr_t s1, scstr_t s2); 2.8 +int ucx_strcmp(scstr_t s1, scstr_t s2); 2.9 2.10 -#define sstrcmp(s1, s2) ucx_str_cmp(SCSTR(s1), SCSTR(s2)) 2.11 +#define sstrcmp(s1, s2) ucx_strcmp(SCSTR(s1), SCSTR(s2)) 2.12 2.13 /** 2.14 * Compares two UCX strings ignoring the case. 2.15 @@ -421,9 +421,9 @@ 2.16 * first two differing characters otherwise (i.e. 0 if the strings match and 2.17 * no characters differ) 2.18 */ 2.19 -int ucx_str_casecmp(scstr_t s1, scstr_t s2); 2.20 +int ucx_strcasecmp(scstr_t s1, scstr_t s2); 2.21 2.22 -#define sstrcasecmp(s1, s2) ucx_str_casecmp(SCSTR(s1), SCSTR(s2)) 2.23 +#define sstrcasecmp(s1, s2) ucx_strcasecmp(SCSTR(s1), SCSTR(s2)) 2.24 2.25 /** 2.26 * Creates a duplicate of the specified string.