MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / icmp

Function icmp

libs/string/string.h:19–26  ·  view source on GitHub ↗

* @brief Case-insensitive string comparison. * * Behaves like the standard strcmp() but ignores case. * * @return A negative integer if lhs is lexicographically less than rhs (ignoring case), 0 if both * are equal, or a positive integer if lhs is greater than rhs. */

Source from the content-addressed store, hash-verified

17 * are equal, or a positive integer if lhs is greater than rhs.
18 */
19inline int icmp(const char* lhs, const char* rhs)
20{
21#ifdef WIN32
22 return _stricmp(lhs, rhs);
23#else
24 return strcasecmp(lhs, rhs);
25#endif
26}
27
28/// Case-insensitive comparison functor for use with data structures
29struct ILess

Callers 6

TESTFunction · 0.85
compareKeyValuesMethod · 0.85
icmpMethod · 0.85
operator()Method · 0.85
string_equal_nocaseFunction · 0.85
string_less_nocaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected