System::String::CompareTo method

String::CompareTo method

Compares two strings in ’less-equals-more’ style. Uses current culture.

int System::String::CompareTo(const String &str) const
ParameterTypeDescription
strconst String&String to compare this to.

ReturnValue

Negative value if this is considered lower than str, zero if they match, positive value if this is greater than str.

See Also