src/ucx/string.h

changeset 315
5b97de37aada
parent 306
90b6d69bb499
child 316
be0f6bd10b52
equal deleted inserted replaced
314:5d28dc8f0765 315:5b97de37aada
401 * @param s2 the second string 401 * @param s2 the second string
402 * @return -1, if the length of s1 is less than the length of s2 or 1, if the 402 * @return -1, if the length of s1 is less than the length of s2 or 1, if the
403 * length of s1 is greater than the length of s2 or the result of 403 * length of s1 is greater than the length of s2 or the result of
404 * <code>memcmp()</code> otherwise (i.e. 0 if the strings match) 404 * <code>memcmp()</code> otherwise (i.e. 0 if the strings match)
405 */ 405 */
406 int ucx_str_cmp(scstr_t s1, scstr_t s2); 406 int ucx_strcmp(scstr_t s1, scstr_t s2);
407 407
408 #define sstrcmp(s1, s2) ucx_str_cmp(SCSTR(s1), SCSTR(s2)) 408 #define sstrcmp(s1, s2) ucx_strcmp(SCSTR(s1), SCSTR(s2))
409 409
410 /** 410 /**
411 * Compares two UCX strings ignoring the case. 411 * Compares two UCX strings ignoring the case.
412 * 412 *
413 * At first it compares the sstr_t.length attribute of the two strings. If and 413 * At first it compares the sstr_t.length attribute of the two strings. If and
419 * @return -1, if the length of s1 is less than the length of s2 or 1, if the 419 * @return -1, if the length of s1 is less than the length of s2 or 1, if the
420 * length of s1 is greater than the length of s2 or the difference between the 420 * length of s1 is greater than the length of s2 or the difference between the
421 * first two differing characters otherwise (i.e. 0 if the strings match and 421 * first two differing characters otherwise (i.e. 0 if the strings match and
422 * no characters differ) 422 * no characters differ)
423 */ 423 */
424 int ucx_str_casecmp(scstr_t s1, scstr_t s2); 424 int ucx_strcasecmp(scstr_t s1, scstr_t s2);
425 425
426 #define sstrcasecmp(s1, s2) ucx_str_casecmp(SCSTR(s1), SCSTR(s2)) 426 #define sstrcasecmp(s1, s2) ucx_strcasecmp(SCSTR(s1), SCSTR(s2))
427 427
428 /** 428 /**
429 * Creates a duplicate of the specified string. 429 * Creates a duplicate of the specified string.
430 * 430 *
431 * The new sstr_t will contain a copy allocated by standard 431 * The new sstr_t will contain a copy allocated by standard

mercurial