Compares substrings of two byte strings, with case-insensitive option.
negative value if the first substring precedes the second
in lexical ordering;
positive value if the first substring follows the second
in lexical ordering;
zero otherwise
If ignoreCase is true, the result is equivalent to performing a case-sensitive comparison after converting the uppercase ASCII letters A-Z in both byte strings to lowercase.
This method is frequently used with ignoreCase true to compare a byte string to a MIME "keyword", such as "Content-Type", where the byte string's content is known to be ASCII characters.
null is a valid argument that always precedes a byte
string in the lexical ordering (that is, it's "less than" a byte
string).
| Exception Type | Condition |
|---|---|
| ArgumentOutOfRangeException | index1 < 0, or index2 < 0, or count < 0, or index1 + count > str1.Length or index2 + count > str2.Length |
ByteString Class | Hunny.Base Namespace | ByteString.Compare Overload List