System::Globalization::CompareInfo Class Reference

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

#include "compare_info.h"

Inherits System::Object.

Public Member Functions

 CompareInfo (const CompareInfo &)=delete
 RTTI information. More...
 
CompareInfooperator= (const CompareInfo &)=delete
 
virtual ASPOSECPP_SHARED_API String get_Name () const
 Gets name of the culture associated with comparer. More...
 
ASPOSECPP_SHARED_API int get_LCID () const
 Gets LCID of the culture associated with comparer. More...
 
ASPOSECPP_SHARED_API SortVersionPtr get_Version () const
 Gets information about sort version. More...
 
virtual ASPOSECPP_SHARED_API int Compare (const String &string1, const String &string2) const
 Compares strings. Not implemented. More...
 
virtual ASPOSECPP_SHARED_API int Compare (const String &a, const String &b, CompareOptions options) const
 Compares strings. Only Ordinal and OrdinalIgnoreCase modes are supported. More...
 
virtual ASPOSECPP_SHARED_API int Compare (const String &string1, int offset1, int length1, const String &string2, int offset2, int length2) const
 Compares a section of one string with a section of second string. Not implemented. More...
 
virtual ASPOSECPP_SHARED_API int Compare (const String &string1, int offset1, const String &string2, int offset2, CompareOptions options) const
 Compares the end section of one string with the end section of second string using string comparison methods. Not implemented. More...
 
virtual ASPOSECPP_SHARED_API int Compare (const String &string1, int offset1, const String &string2, int offset2) const
 Compares the end section of one string with the end section of second string. Not implemented. More...
 
virtual ASPOSECPP_SHARED_API int Compare (const String &string1, int offset1, int length1, const String &string2, int offset2, int length2, CompareOptions options) const
 Compares a section of one string with a section of second string using string comparison methods. Not implemented. More...
 
virtual ASPOSECPP_SHARED_API SortKeyPtr GetSortKey (const String &value, CompareOptions options) const
 Gets SortKey object for the specified string using specified compare options. More...
 
virtual ASPOSECPP_SHARED_API SortKeyPtr GetSortKey (const String &value) const
 Gets SortKey object for the specified string. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, const String &value, int start_index, int count) const
 Looks for substring. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, const String &value, int start_index, CompareOptions options) const
 Looks for substring. Only Ordinal mode is supported. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, const String &value, int start_index, int count, CompareOptions options) const
 Looks for substring. Only Ordinal mode is supported. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, char16_t value, int start_index, int count, CompareOptions options) const
 Looks for the specified character. Only Ordinal mode is supported. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, const String &value, int start_index) const
 Looks for substring. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, char16_t value) const
 Looks for the specified character. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, const String &value) const
 Looks for substring. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, char16_t value, int start_index, CompareOptions options) const
 Looks for the specified character. Only Ordinal mode is supported. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, char16_t value, int start_index, int count) const
 Looks for the specified character. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, char16_t value, int start_index) const
 Looks for the specified character. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, const String &value, CompareOptions options) const
 Looks for substring. Only Ordinal mode is supported. More...
 
virtual ASPOSECPP_SHARED_API int IndexOf (const String &source, char16_t value, CompareOptions options) const
 Looks for the specified character. Only Ordinal mode is supported. More...
 
virtual ASPOSECPP_SHARED_API bool IsPrefix (const String &source, const String &prefix, CompareOptions options) const
 Checks if the specified string starts with the specified prefix using the specified compare options. More...
 
virtual ASPOSECPP_SHARED_API bool IsPrefix (const String &source, const String &prefix) const
 Checks if the specified string starts with the specified prefix. More...
 
virtual ASPOSECPP_SHARED_API bool IsSuffix (const String &source, const String &suffix, CompareOptions options) const
 Checks if the specified string ends with the specified suffix using the specified compare options. More...
 
virtual ASPOSECPP_SHARED_API bool IsSuffix (const String &source, const String &suffix) const
 Checks if the specified string ends with the specified suffix. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, const String &value) const
 Searches last occurrence of the specified substring. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, const String &value, int start_index, int count, CompareOptions options) const
 Searches last occurrence of the specified substring using the specified compare options. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, char16_t value, int start_index, int count, CompareOptions options) const
 Searches last occurrence of the specified character using the specified compare options. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, const String &value, int start_index, int count) const
 Searches last occurrence of the specified string. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, const String &value, int start_index, CompareOptions options) const
 Searches last occurrence of the specified string using the specified compare options. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, char16_t value, int start_index, CompareOptions options) const
 Searches last occurrence of the specified character using the specified compare options. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, const String &value, int start_index) const
 Searches last occurrence of the specified string. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, char16_t value, int start_index) const
 Searches last occurrence of the specified character. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, const String &value, CompareOptions options) const
 Searches last occurrence of the specified string using the specified compare options. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, char16_t value, CompareOptions options) const
 Searches last occurrence of the specified character using the specified compare options. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, char16_t value) const
 Searches last occurrence of the specified character. More...
 
virtual ASPOSECPP_SHARED_API int LastIndexOf (const String &source, char16_t value, int start_index, int count) const
 Searches last occurrence of the specified character. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode (const String &value, CompareOptions options) const
 Gets string hash code based on specified comparison options. More...
 
ASPOSECPP_SHARED_API bool Equals (SharedPtr< Object > other) override
 
ASPOSECPP_SHARED_API int GetHashCode () const override
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
ASPOSECPP_SHARED_API String ToString () const override
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Static Public Member Functions

static ASPOSECPP_SHARED_API CompareInfoPtr GetCompareInfo (int culture, const SharedPtr< Reflection::Assembly > &assembly)
 Gets CompareInfo associated with the specified culture and using string comparison methods in the specified assembly. More...
 
static ASPOSECPP_SHARED_API CompareInfoPtr GetCompareInfo (const String &name, const SharedPtr< Reflection::Assembly > &assembly)
 Gets CompareInfo associated with the specified culture and using string comparison methods in the specified assembly. More...
 
static ASPOSECPP_SHARED_API CompareInfoPtr GetCompareInfo (int culture)
 Gets CompareInfo associated with the specified culture. More...
 
static ASPOSECPP_SHARED_API CompareInfoPtr GetCompareInfo (const String &name)
 Gets CompareInfo associated with the specified culture. More...
 
static ASPOSECPP_SHARED_API bool IsSortable (char16_t ch)
 Checks whether a specified character is sortable. More...
 
static ASPOSECPP_SHARED_API bool IsSortable (const String &text)
 Checks whether a specified string is sortable. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CompareInfo()

System::Globalization::CompareInfo::CompareInfo ( const CompareInfo )
delete

RTTI information.

Member Function Documentation

◆ Compare() [1/6]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::Compare ( const String string1,
const String string2 
) const
virtual

Compares strings. Not implemented.

Parameters
string1LHS string.
string2RHS string.
Returns
Negative value if LHS string preceeds RHS one, zero if they match, positive value otherwise.

◆ Compare() [2/6]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::Compare ( const String a,
const String b,
CompareOptions  options 
) const
virtual

Compares strings. Only Ordinal and OrdinalIgnoreCase modes are supported.

Parameters
aLHS string.
bRHS string.
optionsString comparison type.
Returns
Negative value if LHS string preceeds RHS one, zero if they match, positive value otherwise.

◆ Compare() [3/6]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::Compare ( const String string1,
int  offset1,
int  length1,
const String string2,
int  offset2,
int  length2 
) const
virtual

Compares a section of one string with a section of second string. Not implemented.

Parameters
string1First string.
offset1Start index of characters in string1.
length1Number of characters in string1 to compare.
string2Second string.
offset2Start index of characters in string2.
length2Number of characters in string2 to compare.
Returns
Negative value if first string section preceeds second string section, zero if they match, positive value otherwise.

◆ Compare() [4/6]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::Compare ( const String string1,
int  offset1,
const String string2,
int  offset2,
CompareOptions  options 
) const
virtual

Compares the end section of one string with the end section of second string using string comparison methods. Not implemented.

Parameters
string1First string.
offset1Start index of characters in string1.
string2Second string.
offset2Start index of characters in string2.
optionsString comparison options.
Returns
Negative value if first string section preceeds second string section, zero if they match, positive value otherwise.

◆ Compare() [5/6]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::Compare ( const String string1,
int  offset1,
const String string2,
int  offset2 
) const
virtual

Compares the end section of one string with the end section of second string. Not implemented.

Parameters
string1First string.
offset1Start index of characters in string1.
string2Second string.
offset2Start index of characters in string2.
Returns
Negative value if first string section preceeds second string section, zero if they match, positive value otherwise.

◆ Compare() [6/6]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::Compare ( const String string1,
int  offset1,
int  length1,
const String string2,
int  offset2,
int  length2,
CompareOptions  options 
) const
virtual

Compares a section of one string with a section of second string using string comparison methods. Not implemented.

Parameters
string1First string.
offset1Start index of characters in string1.
length1Number of characters in string1 to compare.
string2Second string.
offset2Start index of characters in string2.
length2Number of characters in string2 to compare.
optionsString comparison options.
Returns
Negative value if first string section preceeds second string section, zero if they match, positive value otherwise.

◆ Equals()

ASPOSECPP_SHARED_API bool System::Globalization::CompareInfo::Equals ( SharedPtr< Object other)
override

◆ get_LCID()

ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::get_LCID ( ) const

Gets LCID of the culture associated with comparer.

◆ get_Name()

virtual ASPOSECPP_SHARED_API String System::Globalization::CompareInfo::get_Name ( ) const
virtual

Gets name of the culture associated with comparer.

◆ get_Version()

ASPOSECPP_SHARED_API SortVersionPtr System::Globalization::CompareInfo::get_Version ( ) const

Gets information about sort version.

◆ GetCompareInfo() [1/4]

static ASPOSECPP_SHARED_API CompareInfoPtr System::Globalization::CompareInfo::GetCompareInfo ( int  culture,
const SharedPtr< Reflection::Assembly > &  assembly 
)
static

Gets CompareInfo associated with the specified culture and using string comparison methods in the specified assembly.

Parameters
cultureCulture identifier (LCID).
assemblyAssembly that contains string comparison methods.
Returns
CompareInfo object.

◆ GetCompareInfo() [2/4]

static ASPOSECPP_SHARED_API CompareInfoPtr System::Globalization::CompareInfo::GetCompareInfo ( const String name,
const SharedPtr< Reflection::Assembly > &  assembly 
)
static

Gets CompareInfo associated with the specified culture and using string comparison methods in the specified assembly.

Parameters
nameCulture name.
assemblyAssembly that contains string comparison methods.
Returns
CompareInfo object.

◆ GetCompareInfo() [3/4]

static ASPOSECPP_SHARED_API CompareInfoPtr System::Globalization::CompareInfo::GetCompareInfo ( int  culture)
static

Gets CompareInfo associated with the specified culture.

Parameters
cultureCulture identifier (LCID).
Returns
CompareInfo object.

◆ GetCompareInfo() [4/4]

static ASPOSECPP_SHARED_API CompareInfoPtr System::Globalization::CompareInfo::GetCompareInfo ( const String name)
static

Gets CompareInfo associated with the specified culture.

Parameters
nameCulture name.
Returns
CompareInfo object.

◆ GetHashCode() [1/2]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::GetHashCode ( const String value,
CompareOptions  options 
) const
virtual

Gets string hash code based on specified comparison options.

Parameters
valueInput string.
optionsString comparsion options.
Returns
Hash code.

◆ GetHashCode() [2/2]

ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::GetHashCode ( ) const
overridevirtual

Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.

Returns
Hash code value as calculated by corresponding class.

Reimplemented from System::Object.

◆ GetSortKey() [1/2]

virtual ASPOSECPP_SHARED_API SortKeyPtr System::Globalization::CompareInfo::GetSortKey ( const String value,
CompareOptions  options 
) const
virtual

Gets SortKey object for the specified string using specified compare options.

Parameters
valueInput string.
optionsCompare options.
Returns
SortKey object.

◆ GetSortKey() [2/2]

virtual ASPOSECPP_SHARED_API SortKeyPtr System::Globalization::CompareInfo::GetSortKey ( const String value) const
virtual

Gets SortKey object for the specified string.

Parameters
valueInput string.
Returns
SortKey object.

◆ IndexOf() [1/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
const String value,
int  start_index,
int  count 
) const
virtual

Looks for substring.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
countNumber of characters in source string.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [2/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
const String value,
int  start_index,
CompareOptions  options 
) const
virtual

Looks for substring. Only Ordinal mode is supported.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
optionsLookup options.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [3/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
const String value,
int  start_index,
int  count,
CompareOptions  options 
) const
virtual

Looks for substring. Only Ordinal mode is supported.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
countNumber of characters in source string.
optionsLookup options.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [4/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
char16_t  value,
int  start_index,
int  count,
CompareOptions  options 
) const
virtual

Looks for the specified character. Only Ordinal mode is supported.

Parameters
sourceSource string.
valueCharacter.
start_indexLookup start index in source string.
countNumber of characters in source string.
optionsLookup options.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [5/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
const String value,
int  start_index 
) const
virtual

Looks for substring.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [6/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
char16_t  value 
) const
virtual

Looks for the specified character.

Parameters
sourceSource string.
valueCharacter.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [7/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
const String value 
) const
virtual

Looks for substring.

Parameters
sourceSource string.
valueLookup value.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [8/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
char16_t  value,
int  start_index,
CompareOptions  options 
) const
virtual

Looks for the specified character. Only Ordinal mode is supported.

Parameters
sourceSource string.
valueCharacter.
start_indexLookup start index in source string.
optionsLookup options.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [9/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
char16_t  value,
int  start_index,
int  count 
) const
virtual

Looks for the specified character.

Parameters
sourceSource string.
valueCharacter.
start_indexLookup start index in source string.
countNumber of characters in source string.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [10/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
char16_t  value,
int  start_index 
) const
virtual

Looks for the specified character.

Parameters
sourceSource string.
valueCharacter.
start_indexLookup start index in source string.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [11/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
const String value,
CompareOptions  options 
) const
virtual

Looks for substring. Only Ordinal mode is supported.

Parameters
sourceSource string.
valueLookup value.
optionsLookup options.
Returns
Index of lookup value in source string or -1 if not found.

◆ IndexOf() [12/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::IndexOf ( const String source,
char16_t  value,
CompareOptions  options 
) const
virtual

Looks for the specified character. Only Ordinal mode is supported.

Parameters
sourceSource string.
valueCharacter.
optionsLookup options.
Returns
Index of lookup value in source string or -1 if not found.

◆ IsPrefix() [1/2]

virtual ASPOSECPP_SHARED_API bool System::Globalization::CompareInfo::IsPrefix ( const String source,
const String prefix,
CompareOptions  options 
) const
virtual

Checks if the specified string starts with the specified prefix using the specified compare options.

Parameters
sourceSource string.
prefixPrefix string.
optionsCompare options.
Returns
True if string starts with prefix; otherwise false.

◆ IsPrefix() [2/2]

virtual ASPOSECPP_SHARED_API bool System::Globalization::CompareInfo::IsPrefix ( const String source,
const String prefix 
) const
virtual

Checks if the specified string starts with the specified prefix.

Parameters
sourceSource string.
prefixPrefix string.
Returns
True if string starts with prefix; otherwise false.

◆ IsSortable() [1/2]

static ASPOSECPP_SHARED_API bool System::Globalization::CompareInfo::IsSortable ( char16_t  ch)
static

Checks whether a specified character is sortable.

Parameters
chUnicode character.
Returns
True if ch is sortable; otherwise false.

◆ IsSortable() [2/2]

static ASPOSECPP_SHARED_API bool System::Globalization::CompareInfo::IsSortable ( const String text)
static

Checks whether a specified string is sortable.

Parameters
textA string.
Returns
True if text is not empty and all characters in text are sortable; otherwise false.

◆ IsSuffix() [1/2]

virtual ASPOSECPP_SHARED_API bool System::Globalization::CompareInfo::IsSuffix ( const String source,
const String suffix,
CompareOptions  options 
) const
virtual

Checks if the specified string ends with the specified suffix using the specified compare options.

Parameters
sourceSource string.
suffixSuffix string.
optionsCompare options.
Returns
True if string ends with suffix; otherwise false.

◆ IsSuffix() [2/2]

virtual ASPOSECPP_SHARED_API bool System::Globalization::CompareInfo::IsSuffix ( const String source,
const String suffix 
) const
virtual

Checks if the specified string ends with the specified suffix.

Parameters
sourceSource string.
suffixSuffix string.
Returns
True if string ends with suffix; otherwise false.

◆ LastIndexOf() [1/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
const String value 
) const
virtual

Searches last occurrence of the specified substring.

Parameters
sourceSource string.
valueLookup value.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [2/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
const String value,
int  start_index,
int  count,
CompareOptions  options 
) const
virtual

Searches last occurrence of the specified substring using the specified compare options.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
countNumber of characters in source string.
optionsCompare options.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [3/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
char16_t  value,
int  start_index,
int  count,
CompareOptions  options 
) const
virtual

Searches last occurrence of the specified character using the specified compare options.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
countNumber of characters in source string.
optionsCompare options.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [4/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
const String value,
int  start_index,
int  count 
) const
virtual

Searches last occurrence of the specified string.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
countNumber of characters in source string.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [5/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
const String value,
int  start_index,
CompareOptions  options 
) const
virtual

Searches last occurrence of the specified string using the specified compare options.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
optionsCompare options.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [6/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
char16_t  value,
int  start_index,
CompareOptions  options 
) const
virtual

Searches last occurrence of the specified character using the specified compare options.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
optionsCompare options.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [7/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
const String value,
int  start_index 
) const
virtual

Searches last occurrence of the specified string.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [8/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
char16_t  value,
int  start_index 
) const
virtual

Searches last occurrence of the specified character.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [9/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
const String value,
CompareOptions  options 
) const
virtual

Searches last occurrence of the specified string using the specified compare options.

Parameters
sourceSource string.
valueLookup value.
optionsCompare options.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [10/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
char16_t  value,
CompareOptions  options 
) const
virtual

Searches last occurrence of the specified character using the specified compare options.

Parameters
sourceSource string.
valueLookup value.
optionsCompare options.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [11/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
char16_t  value 
) const
virtual

Searches last occurrence of the specified character.

Parameters
sourceSource string.
valueLookup value.
Returns
Index of lookup value in source string or -1 if not found.

◆ LastIndexOf() [12/12]

virtual ASPOSECPP_SHARED_API int System::Globalization::CompareInfo::LastIndexOf ( const String source,
char16_t  value,
int  start_index,
int  count 
) const
virtual

Searches last occurrence of the specified character.

Parameters
sourceSource string.
valueLookup value.
start_indexLookup start index in source string.
countNumber of characters in source string.
Returns
Index of lookup value in source string or -1 if not found.

◆ operator=()

CompareInfo& System::Globalization::CompareInfo::operator= ( const CompareInfo )
delete

◆ ToString()

ASPOSECPP_SHARED_API String System::Globalization::CompareInfo::ToString ( ) const
overridevirtual

Analog of C# Object.ToString() method. Enables converting custom objects to string.

Returns
String representation as provided by final class.

Reimplemented from System::Object.