Internals: using ImToUpper() since std one does too many things.

As a bonus side-effect may remove reliance on ctype.h (will see if CI complains)
This commit is contained in:
ocornut
2022-10-21 16:13:52 +02:00
parent 9a35bfea39
commit bc918404fe
3 changed files with 6 additions and 7 deletions

View File

@ -335,6 +335,7 @@ IMGUI_API const char* ImStristr(const char* haystack, const char* haystack_end
IMGUI_API void ImStrTrimBlanks(char* str);
IMGUI_API const char* ImStrSkipBlank(const char* str);
IM_MSVC_RUNTIME_CHECKS_OFF
static inline char ImToUpper(char c) { return (c >= 'a' && c <= 'z') ? c &= ~32 : c; }
static inline bool ImCharIsBlankA(char c) { return c == ' ' || c == '\t'; }
static inline bool ImCharIsBlankW(unsigned int c) { return c == ' ' || c == '\t' || c == 0x3000; }
IM_MSVC_RUNTIME_CHECKS_RESTORE