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

Function SDL_GetStringBoolean

deps/SDL2/src/SDL_hints.c:122–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122SDL_bool
123SDL_GetStringBoolean(const char *value, SDL_bool default_value)
124{
125 if (!value || !*value) {
126 return default_value;
127 }
128 if (*value == '0' || SDL_strcasecmp(value, "false") == 0) {
129 return SDL_FALSE;
130 }
131 return SDL_TRUE;
132}
133
134SDL_bool
135SDL_GetHintBoolean(const char *name, SDL_bool default_value)

Calls 1

SDL_strcasecmpFunction · 0.85

Tested by

no test coverage detected