mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Turn string_is_equal into selfcontained function
This commit is contained in:
parent
dd517f4660
commit
76788d3890
1 changed files with 5 additions and 1 deletions
|
@ -40,7 +40,11 @@ static INLINE bool string_is_empty(const char *data)
|
|||
|
||||
static INLINE bool string_is_equal(const char *a, const char *b)
|
||||
{
|
||||
return (a && b) ? (strcmp(a, b) == 0) : false;
|
||||
if (!a || !b)
|
||||
return false;
|
||||
while(*a && (*a == *b))
|
||||
a++, b++;
|
||||
return (*(const unsigned char*)a - *(const unsigned char*)b) == 0;
|
||||
}
|
||||
|
||||
static INLINE bool string_is_equal_noncase(const char *a, const char *b)
|
||||
|
|
Loading…
Add table
Reference in a new issue