MCPcopy Create free account
hub / github.com/LuminanceHDR/LuminanceHDR / charDiff

Function charDiff

src/Libpfs/utils/string.cpp:33–37  ·  view source on GitHub ↗

Utility functions for case insensitive string compare

Source from the content-addressed store, hash-verified

31
32// Utility functions for case insensitive string compare
33static int charDiff(char c1, char c2) {
34 if (tolower(c1) < tolower(c2)) return -1;
35 if (tolower(c1) == tolower(c2)) return 0;
36 return 1;
37}
38
39static int stringCompare(const string &str1, const string &str2) {
40 int diff = 0;

Callers 1

stringCompareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected