System::String::Compare method

String::Compare(const String&, int, const String&, int, int, bool) method

Less-equal-greater-compares two substrings.

static int System::String::Compare(const String &strA, int indexA, const String &strB, int indexB, int length, bool ignoreCase=false)
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.
ignoreCaseboolSpecifies whether comparison is case-insensitive.

ReturnValue

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

See Also

String::Compare(const String&, int, const String&, int, int, bool, const SharedPtr<System::Globalization::CultureInfo>&) method

Less-equal-greater-compares two substrings.

static int System::String::Compare(const String &strA, int indexA, const String &strB, int indexB, int length, bool ignoreCase, const SharedPtr<System::Globalization::CultureInfo> &ci)
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.
ignoreCaseboolSpecifies whether comparison is case-insensitive.
ciconst SharedPtr<System::Globalization::CultureInfo>&Culture to use for comparison.

ReturnValue

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

See Also

String::Compare(const String&, const String&, System::StringComparison) method

Less-equal-greater-compares two strings.

static int System::String::Compare(const String &strA, const String &strB, System::StringComparison comparison_type)
ParameterTypeDescription
strAconst String&First string to compare.
strBconst String&Second string to compare.
comparison_typeSystem::StringComparisonComparison mode.

ReturnValue

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

See Also

String::Compare(const String&, int, const String&, int, int, System::StringComparison) method

Less-equal-greater-compares two strings.

static int System::String::Compare(const String &strA, int indexA, const String &strB, int indexB, int length, System::StringComparison comparison_type)
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.
comparison_typeSystem::StringComparisonComparison mode.

ReturnValue

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

See Also

String::Compare(const String&, const String&, bool) method

Less-equal-greater-compares two strings.

static int System::String::Compare(const String &strA, const String &strB, bool ignoreCase=false)
ParameterTypeDescription
strAconst String&First string to compare.
strBconst String&Second string to compare.
ignoreCaseboolSpecifies whether comparison is case-insensitive.

ReturnValue

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

See Also

String::Compare(const String&, const String&, bool, const SharedPtr<System::Globalization::CultureInfo>&) method

Less-equal-greater-compares two strings.

static int System::String::Compare(const String &strA, const String &strB, bool ignoreCase, const SharedPtr<System::Globalization::CultureInfo> &ci)
ParameterTypeDescription
strAconst String&First string to compare.
strBconst String&Second string to compare.
ignoreCaseboolSpecifies whether comparison is case-insensitive.
ciconst SharedPtr<System::Globalization::CultureInfo>&Culture to use for comparison.

ReturnValue

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

See Also