MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_strcasecmp

Function SDL_strcasecmp

deps/SDL2/src/stdlib/SDL_string.c:1013–1035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1011}
1012
1013int
1014SDL_strcasecmp(const char *str1, const char *str2)
1015{
1016#ifdef HAVE_STRCASECMP
1017 return strcasecmp(str1, str2);
1018#elif defined(HAVE__STRICMP)
1019 return _stricmp(str1, str2);
1020#else
1021 char a = 0;
1022 char b = 0;
1023 while (*str1 && *str2) {
1024 a = SDL_toupper((unsigned char) *str1);
1025 b = SDL_toupper((unsigned char) *str2);
1026 if (a != b)
1027 break;
1028 ++str1;
1029 ++str2;
1030 }
1031 a = SDL_toupper(*str1);
1032 b = SDL_toupper(*str2);
1033 return (int) ((unsigned char) a - (unsigned char) b);
1034#endif /* HAVE_STRCASECMP */
1035}
1036
1037int
1038SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen)

Callers 15

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
SDL_GetStringBooleanFunction · 0.85
LoadLibSampleRateFunction · 0.85

Calls 1

SDL_toupperFunction · 0.85

Tested by 13

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
SDLTest_CommonArgFunction · 0.68