Own replacement for nonstandard strncasecmp
| 23 | |
| 24 | // Own replacement for nonstandard strncasecmp |
| 25 | static bool StringEquals( const char* const s0, const char* const s1, const unsigned int max_length ) |
| 26 | { |
| 27 | unsigned int i= 0; |
| 28 | while( s0[i] != '\0' && s1[i] != '\0' && i < max_length ) |
| 29 | { |
| 30 | if( std::tolower( s0[i] ) != std::tolower( s1[i] ) ) |
| 31 | return false; |
| 32 | i++; |
| 33 | } |
| 34 | |
| 35 | return i == max_length || s0[i] == s1[i]; |
| 36 | } |
| 37 | |
| 38 | static const char* ExtractFileName( const char* const file_path ) |
| 39 | { |