MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / compare

Method compare

src/string.cpp:269–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267 static bool lt(char c1, char c2) { return toupper(c1) < toupper(c2); }
268
269 static int compare(const char *s1, const char *s2, size_t n)
270 {
271 while (n-- != 0) {
272 if (toupper(*s1) < toupper(*s2)) return -1;
273 if (toupper(*s1) > toupper(*s2)) return 1;
274 ++s1; ++s2;
275 }
276 return 0;
277 }
278
279 static const char *find(const char *s, size_t n, char a)
280 {

Callers 3

IsSameValueMethod · 0.45
ReplaceWordsFunction · 0.45
StrCompareIgnoreCaseFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected