System::String::CompareOrdinal method

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)
ParameterTypeDescription
strAconst String&First string to compare.
strBconst String&Second string to compare.

ReturnValue

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

See Also

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)
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.

ReturnValue

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

See Also