mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-20 03:38:28 +00:00
Fixed bug 5001 - Feature request: SDL_isupper & SDL_islower
This commit is contained in:
parent
a8f91340c8
commit
aa384ad02b
4 changed files with 10 additions and 0 deletions
|
@ -438,11 +438,15 @@ int SDL_abs(int x)
|
|||
#if defined(HAVE_CTYPE_H)
|
||||
int SDL_isdigit(int x) { return isdigit(x); }
|
||||
int SDL_isspace(int x) { return isspace(x); }
|
||||
int SDL_isupper(int x) { return isupper(x); }
|
||||
int SDL_islower(int x) { return islower(x); }
|
||||
int SDL_toupper(int x) { return toupper(x); }
|
||||
int SDL_tolower(int x) { return tolower(x); }
|
||||
#else
|
||||
int SDL_isdigit(int x) { return ((x) >= '0') && ((x) <= '9'); }
|
||||
int SDL_isspace(int x) { return ((x) == ' ') || ((x) == '\t') || ((x) == '\r') || ((x) == '\n') || ((x) == '\f') || ((x) == '\v'); }
|
||||
int SDL_isupper(int x) { return ((x) >= 'A') && ((x) <= 'Z'); }
|
||||
int SDL_islower(int x) { return ((x) >= 'a') && ((x) <= 'z'); }
|
||||
int SDL_toupper(int x) { return ((x) >= 'a') && ((x) <= 'z') ? ('A'+((x)-'a')) : (x); }
|
||||
int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a'+((x)-'A')) : (x); }
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue