MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / StringEquals

Function StringEquals

PanzerChasm/vfs.cpp:25–36  ·  view source on GitHub ↗

Own replacement for nonstandard strncasecmp

Source from the content-addressed store, hash-verified

23
24// Own replacement for nonstandard strncasecmp
25static 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
38static const char* ExtractFileName( const char* const file_path )
39{

Callers 1

ReadFileMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected