CompareOrdinal()

String::CompareOrdinal(const String&, const String&) method

Less-equal-greater-compares two strings using ordinal mode.

static int System::String::CompareOrdinal(const String &strA, const String &strB)

Arguments

ParameterTypeDescription
strAconst String&First string to compare.
strBconst String&Second string to compare.

Return Value

Negative value if first substring is less then second, zero if they match, positive value otherwise.

String::CompareOrdinal(const String&, int, const String&, int, int) method

Less-equal-greater-compares two strings using ordinal mode.

static int System::String::CompareOrdinal(const String &strA, int indexA, const String &strB, int indexB, int length)

Arguments

ParameterTypeDescription
strAconst String&First string to compare.
indexAintBeginning of first string substring.
strBconst String&Second string to compare.
indexBintBeginning of the second string substring.
lengthintNumber of characters to compare.

Return Value

Negative value if first substring is less then second, zero if they match, positive value otherwise.

See Also