stdstring: Delete duplicate function

This commit is contained in:
Alcaro 2020-08-16 02:33:25 +02:00 committed by GitHub
parent 4958e30d8f
commit df2db8bceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,23 +98,8 @@ static INLINE bool string_is_equal_case_insensitive(const char *a,
return (result == 0);
}
static INLINE bool string_is_equal_noncase(const char *a, const char *b)
{
int result = 0;
const unsigned char *p1 = (const unsigned char*)a;
const unsigned char *p2 = (const unsigned char*)b;
if (!a || !b)
return false;
if (p1 == p2)
return false;
while ((result = tolower (*p1) - tolower (*p2++)) == 0)
if (*p1++ == '\0')
break;
return (result == 0);
}
/* Deprecated alias, all callers should use string_is_equal_case_insensitive instead */
#define string_is_equal_noncase string_is_equal_case_insensitive
char *string_to_upper(char *s);