Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
enum System.Globalization.CompareOptions
Assembly: System.Runtime
Defines the string comparison options to use with <see cref="T:System.Globalization.CompareInfo" /> .
Values
None
Indicates the default option settings for string comparisons.
IgnoreCase
Indicates that the string comparison ignores case differences.
IgnoreNonSpace
Indicates that the string comparison ignores nonspacing combining characters, such as diacritics. Nonspacing characters modify base characters without occupying their own space. The Unicode Standard defines combining characters as characters that are combined with base characters to produce a new character.
IgnoreSymbols
Indicates that the string comparison ignores symbols, including whitespace, punctuation, currency symbols, the percent sign, mathematical symbols, the ampersand, and similar characters.
IgnoreKanaType
Indicates that the string comparison ignores the kana type. Kana type refers to Japanese hiragana and katakana characters, which represent phonetic sounds. Hiragana is used for native Japanese words, while katakana is used for words borrowed from other languages. With this option, hiragana and katakana characters that represent the same sound are considered equal.
IgnoreWidth
Indicates that the string comparison ignores character width. For example, full-width and half-width forms of Japanese katakana characters are considered equal with this option.
NumericOrdering
<para>The option that specifies that string comparisons sort sequences of digits (Unicode general category "Nd") based on their numeric value.</para> <para>For example, "2" comes before "10". Non-digit characters such as decimal points, minus, and plus signs</para> <para>are not considered as part of the sequence and will terminate it. This flag is not valid for indexing methods (such as <see cref="M:System.Globalization.CompareInfo.IndexOf(System.String,System.String,System.Globalization.CompareOptions)" /> and <see cref="M:System.Globalization.CompareInfo.IsPrefix(System.String,System.String,System.Globalization.CompareOptions)" />).</para>
OrdinalIgnoreCase
Indicates that the string comparison ignores case and then performs an ordinal comparison. This is equivalent to converting both strings to uppercase using the invariant culture and then performing the comparison.
StringSort
Indicates that the string comparison uses the string sort algorithm, where nonalphanumeric symbols (such as hyphens and apostrophes) are sorted before alphanumeric characters.
Ordinal
Indicates that the string comparison uses the Unicode UTF-16 encoded values of the strings, comparing them code unit by code unit. This results in a fast, culture-insensitive comparison where strings are ordered based only on their binary values. This option can't be combined with other <see cref="T:System.Globalization.CompareOptions" /> values and must be used alone.