MCPcopy Create free account
hub / github.com/OpenPrinting/cups / _cups_strcasecmp

Function _cups_strcasecmp

cups/string.c:620–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618 */
619
620int /* O - Result of comparison (-1, 0, or 1) */
621_cups_strcasecmp(const char *s, /* I - First string */
622 const char *t) /* I - Second string */
623{
624 while (*s != '\0' && *t != '\0')
625 {
626 if (_cups_tolower(*s) < _cups_tolower(*t))
627 return (-1);
628 else if (_cups_tolower(*s) > _cups_tolower(*t))
629 return (1);
630
631 s ++;
632 t ++;
633 }
634
635 if (*s == '\0' && *t == '\0')
636 return (0);
637 else if (*s != '\0')
638 return (1);
639 else
640 return (-1);
641}
642
643/*
644 * '_cups_strncasecmp()' - Do a case-insensitive comparison on up to N chars.

Callers 15

eval_exprFunction · 0.85
get_serviceFunction · 0.85
mainFunction · 0.85
compare_urisFunction · 0.85
do_monitor_printer_stateFunction · 0.85
do_testFunction · 0.85
do_testsFunction · 0.85
token_cbFunction · 0.85
with_valueFunction · 0.85
compare_ppdsFunction · 0.85

Calls 1

_cups_tolowerFunction · 0.85

Tested by 15

add_ppd_filterFunction · 0.68
mainFunction · 0.68
check_constraintsFunction · 0.68
check_caseFunction · 0.68
check_sizesFunction · 0.68
check_translationsFunction · 0.68
show_conflictsFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
dests_equalFunction · 0.68
show_diffsFunction · 0.68
read_write_testsFunction · 0.68