System::Globalization::CompareInfo class

CompareInfo class

Makes culture-sensitive string comparison. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class CompareInfo : public virtual System::Object

Methods

MethodDescription
virtual Compare(const String&, const String&) constCompares strings. Not implemented.
virtual Compare(const String&, const String&, CompareOptions) constCompares strings. Only Ordinal and OrdinalIgnoreCase modes are supported.
virtual Compare(const String&, int, int, const String&, int, int) constCompares a section of one string with a section of second string. Not implemented.
virtual Compare(const String&, int, const String&, int, CompareOptions) constCompares the end section of one string with the end section of second string using string comparison methods. Not implemented.
virtual Compare(const String&, int, const String&, int) constCompares the end section of one string with the end section of second string. Not implemented.
virtual Compare(const String&, int, int, const String&, int, int, CompareOptions) constCompares a section of one string with a section of second string using string comparison methods. Not implemented.
CompareInfo(const CompareInfo&)RTTI information.
Equals(SharedPtr<Object>) override
get_LCID() constGets LCID of the culture associated with comparer.
virtual get_Name() constGets name of the culture associated with comparer.
get_Version() constGets information about sort version.
static GetCompareInfo(int, const SharedPtr<Reflection::Assembly>&)Gets CompareInfo associated with the specified culture and using string comparison methods in the specified assembly.
static GetCompareInfo(const String&, const SharedPtr<Reflection::Assembly>&)Gets CompareInfo associated with the specified culture and using string comparison methods in the specified assembly.
static GetCompareInfo(int)Gets CompareInfo associated with the specified culture.
static GetCompareInfo(const String&)Gets CompareInfo associated with the specified culture.
virtual GetHashCode(const String&, CompareOptions) constGets string hash code based on specified comparison options.
GetHashCode() const overrideAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
virtual GetSortKey(const String&, CompareOptions) constGets SortKey object for the specified string using specified compare options.
virtual GetSortKey(const String&) constGets SortKey object for the specified string.
virtual IndexOf(const String&, const String&, int, int) constLooks for substring.
virtual IndexOf(const String&, const String&, int, CompareOptions) constLooks for substring. Only Ordinal mode is supported.
virtual IndexOf(const String&, const String&, int, int, CompareOptions) constLooks for substring. Only Ordinal mode is supported.
virtual IndexOf(const String&, char16_t, int, int, CompareOptions) constLooks for the specified character. Only Ordinal mode is supported.
virtual IndexOf(const String&, const String&, int) constLooks for substring.
virtual IndexOf(const String&, char16_t) constLooks for the specified character.
virtual IndexOf(const String&, const String&) constLooks for substring.
virtual IndexOf(const String&, char16_t, int, CompareOptions) constLooks for the specified character. Only Ordinal mode is supported.
virtual IndexOf(const String&, char16_t, int, int) constLooks for the specified character.
virtual IndexOf(const String&, char16_t, int) constLooks for the specified character.
virtual IndexOf(const String&, const String&, CompareOptions) constLooks for substring. Only Ordinal mode is supported.
virtual IndexOf(const String&, char16_t, CompareOptions) constLooks for the specified character. Only Ordinal mode is supported.
virtual IsPrefix(const String&, const String&, CompareOptions) constChecks if the specified string starts with the specified prefix using the specified compare options.
virtual IsPrefix(const String&, const String&) constChecks if the specified string starts with the specified prefix.
static IsSortable(char16_t)Checks whether a specified character is sortable.
static IsSortable(const String&)Checks whether a specified string is sortable.
virtual IsSuffix(const String&, const String&, CompareOptions) constChecks if the specified string ends with the specified suffix using the specified compare options.
virtual IsSuffix(const String&, const String&) constChecks if the specified string ends with the specified suffix.
virtual LastIndexOf(const String&, const String&) constSearches last occurrence of the specified substring.
virtual LastIndexOf(const String&, const String&, int, int, CompareOptions) constSearches last occurrence of the specified substring using the specified compare options.
virtual LastIndexOf(const String&, char16_t, int, int, CompareOptions) constSearches last occurrence of the specified character using the specified compare options.
virtual LastIndexOf(const String&, const String&, int, int) constSearches last occurrence of the specified string.
virtual LastIndexOf(const String&, const String&, int, CompareOptions) constSearches last occurrence of the specified string using the specified compare options.
virtual LastIndexOf(const String&, char16_t, int, CompareOptions) constSearches last occurrence of the specified character using the specified compare options.
virtual LastIndexOf(const String&, const String&, int) constSearches last occurrence of the specified string.
virtual LastIndexOf(const String&, char16_t, int) constSearches last occurrence of the specified character.
virtual LastIndexOf(const String&, const String&, CompareOptions) constSearches last occurrence of the specified string using the specified compare options.
virtual LastIndexOf(const String&, char16_t, CompareOptions) constSearches last occurrence of the specified character using the specified compare options.
virtual LastIndexOf(const String&, char16_t) constSearches last occurrence of the specified character.
virtual LastIndexOf(const String&, char16_t, int, int) constSearches last occurrence of the specified character.
operator=(const CompareInfo&)
ToString() const overrideAnalog of C# Object.ToString() method. Enables converting custom objects to string.

See Also