Radiant:
menus... * Shortcuts item moved from Help to Edit misc... * fix: q1 mdl reader out of bounds reading crash * fix: q1 mdl loading of MDL_FRAME_GROUP case * fix: rightclick main wnd border, release in texbro glwidget == crash (unfreezepointer) * texbro: search in currently shown textures * ask for saving nonsaved map on project settings change * func_detail to nongame group ents counter * deiconify main wnd, unmaximize maximized view on app closing to save correct layout data * close preferences dialog on ESC * Enter = Ok in global and path settings dialogs * print renderer stats in XY views too * global 'show renderer stats' option, def = off * ~10x faster opengl text rendering
This commit is contained in:
@@ -251,6 +251,23 @@ inline char* string_to_uppercase( char* string ){
|
||||
return string;
|
||||
}
|
||||
|
||||
//http://stackoverflow.com/questions/27303062/strstr-function-like-that-ignores-upper-or-lower-case
|
||||
//chux: Somewhat tricky to match the corner cases of strstr() with inputs like "x","", "","x", "",""
|
||||
inline const char* string_in_string_nocase( const char* haystack, const char* needle ) {
|
||||
do {
|
||||
const char* h = haystack;
|
||||
const char* n = needle;
|
||||
while ( std::tolower( ( unsigned char ) *h ) == std::tolower( ( unsigned char ) *n ) && *n ) {
|
||||
h++;
|
||||
n++;
|
||||
}
|
||||
if ( *n == 0 ) {
|
||||
return haystack;
|
||||
}
|
||||
} while ( *haystack++ );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// \brief A re-entrant string tokeniser similar to strchr.
|
||||
class StringTokeniser
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user