Equals()

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

String equality comparison. Several modes provided by StringComparison enumeration are supported.

bool System::String::Equals(const String &str, System::StringComparison comparison_type) const

Arguments

ParameterTypeDescription
strconst String&String to compare against the current one.
comparison_typeSystem::StringComparisonComparison mode (see System::StringComparison for details).

Return Value

true if strings match using selected comparison type, false otherwise.

String::Equals(const String&) const method

String equality comparison. Uses System::StringComparison::Ordinal comparison mode.

bool System::String::Equals(const String &str) const

Arguments

ParameterTypeDescription
strconst String&String to compare against the current one.

Return Value

true if strings match, false otherwise.

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

Equal-compares two strings using Ordial comparison mode.

static bool System::String::Equals(const String &strA, const String &strB)

Arguments

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

Return Value

true if strings match, false otherwise.

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

Equal-compares two strings.

static bool System::String::Equals(const String &strA, const String &strB, System::StringComparison comparison_type)

Arguments

ParameterTypeDescription
strAconst String&First string to compare.
strBconst String&Second string to compare.
comparison_typeSystem::StringComparisonComparison mode.

Return Value

true if strings match, false otherwise.

See Also