When comparing individual byte values from two separate byte[] sources (arrays / pointers), how would one perform a case INSENSITIVE comparison?
I have one very large array of bytes containing the "haystack" of strings I am accessing through pointer and I am comparing it to a "needle" pattern, but currently it's only returning when there is an exact case sensitive match.
Is it possible to create a lookup dictionary containing the upper-to-lower values and use that in the comparing loop or is there a faster way? (performance-wise)
Edit1:
The strings are UTF8 encoded.
The desired behavior would be: return true when comparing either a,a; A,A; or a,A. But since 'A' in UTF8 has a value of 65 and 'a' has a value of 97, I cannot do case-insensitive comparison.