CompareOptions
Defines the string comparison options to use with certain implementations of the
CorString.Compare and CorString.Equals methods.
This enumeration allows a bitwise combination of its member values.
Public Enum CompareOptions
Values
- None = 0
- Indicates the default option settings for string comparisons.
- IgnoreCase = &H1
- Indicates that the string comparison must ignore case.
- IgnoreNonSpace = &H2
- Indicates that the string comparison must ignore nonspacing combining characters, such as diacritics.
The Online Unicode Standard defines combining characters as characters that are
combined with base characters to produce a new character. Nonspacing combining characters do not occupy a spacing position by themselves when rendered.
- IgnoreSymbols = &H4
- Indicates that the string comparison must ignore symbols, such as white-space characters, punctuation, currency symbols, the percent sign, mathematical symbols, the ampersand, and so on.
- IgnoreKanaType = &H8
- Indicates that the string comparison must ignore the Kana type. Kana type refers to Japanese hiragana and katakana characters,
which represent phonetic sounds in the Japanese language. Hiragana is used for native Japanese expressions and words, while katakana is used for
words borrowed from other languages, such as "computer" or "Internet". A phonetic sound can be expressed in both hiragana and katakana. If this value
is selected, the hiragana character for one sound is considered equal to the katakana character for the same sound.
- IgnoreWidth = &H10
- Indicates that the string comparison must ignore the character width. For example, Japanese katakana
characters can be written as full-width or half-width. If this value is selected, the katakana characters written as full-width
are considered equal to the same characters written as half-width
- OrdinalIgnoreCaseOption = &H10000000
- String comparison must ignore case, then perform an ordinal comparison. This technique is
equivalent to converting the string to uppercase using the invariant culture and then performing an ordinal comparison on the result.
- StringSort = &H20000000
- Indicates that the string comparison must use the string sort algorithm. In a string sort, the hyphen and the apostrophe, as well as other nonalphanumeric symbols, come before alphanumeric characters.
- OrdinalOption = &H40000000
- Indicates that the string comparison must use successive Unicode UTF-16 encoded values of the string
(code unit by code unit comparison), leading to a fast comparison but one that is culture-insensitive. A string starting with a
code unit \uXXXX comes before a string starting with \uYYYY, if \uXXXX is less than \uYYYY.
This value cannot be combined with other CompareOptions values and must be used alone.
See Also
Project CorLib Overview
Class CorString Overview