MCPcopy Create free account
hub / github.com/Squirrel/Squirrel.Windows / strcmpcasenosensitive_internal

Function strcmpcasenosensitive_internal

src/Setup/unzip.cpp:2845–2864  ·  view source on GitHub ↗

My own strcmpi / strcasecmp

Source from the content-addressed store, hash-verified

2843
2844// My own strcmpi / strcasecmp
2845int strcmpcasenosensitive_internal (const char* fileName1,const char *fileName2)
2846{
2847 for (;;)
2848 {
2849 char c1=*(fileName1++);
2850 char c2=*(fileName2++);
2851 if ((c1>='a') && (c1<='z'))
2852 c1 -= (char)0x20;
2853 if ((c2>='a') && (c2<='z'))
2854 c2 -= (char)0x20;
2855 if (c1=='\0')
2856 return ((c2=='\0') ? 0 : -1);
2857 if (c2=='\0')
2858 return 1;
2859 if (c1<c2)
2860 return -1;
2861 if (c1>c2)
2862 return 1;
2863 }
2864}
2865
2866
2867

Callers 1

unzStringFileNameCompareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected