Hunny Software Library Reference

ByteString.Compare Method (ByteString, ByteString)

Compares two byte strings

[Visual Basic]
Overloads Public Shared Function Compare( _
   ByVal str1 As ByteString, _
   ByVal str2 As ByteString _
) As Integer
[C#]
public static int Compare(
   ByteString str1,
   ByteString str2
);

Parameters

str1
first byte string
str2
second byte string

Return Value

negative value if the first byte string precedes the second in lexical ordering;
positive value if the first byte string follows the second in lexical ordering;
zero otherwise

Remarks

null is a valid argument that always precedes a byte string in the lexical ordering (that is, it's "less than" a byte string).

If the two byte strings contain 8-bit text, then the comparison result is equivalent to a case-sensitive comparison result.

See Also

ByteString Class | Hunny.Base Namespace | ByteString.Compare Overload List