add SafeStrCmp
This commit is contained in:
parent
c6c7cb379e
commit
837e2d9f9e
@ -393,4 +393,9 @@ namespace a8
|
||||
return true;
|
||||
}
|
||||
|
||||
int SafeStrCmp(const char* s1, const char* s2)
|
||||
{
|
||||
return strcmp(s1 ? s1 : "", s2 ? s2 : "");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ namespace a8
|
||||
std::string JsonEscapeString(const std::string& str);
|
||||
std::string IntToFixedString(int val, int n);
|
||||
bool ReadStringFromFile(const std::string& filename, std::string& data);
|
||||
int SafeStrCmp(const char* s1, const char* s2);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user