You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Globalization/CharUnicodeInfo.xml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -670,7 +670,7 @@ Each version of the Unicode standard includes information on changes to the Unic
670
670
<formattype="text/markdown"><.
673
+
The Unicode characters are divided into categories. A character's category is one of its properties. For example, a character might be an uppercase letter, a lowercase letter, a decimal digit number, a letter number, a connector punctuation, a math symbol, or a currency symbol. The <xref:System.Globalization.UnicodeCategory> enumeration returns the category of a Unicode character. For more information on Unicode characters, see the [Unicode Standard](https://go.microsoft.com/fwlink/?linkid=37123).
674
674
675
675
The <xref:System.Globalization.CharUnicodeInfo.GetUnicodeCategory%2A> method assumes that `ch` corresponds to a single linguistic character and returns its category. This means that, for surrogate pairs, it returns <xref:System.Globalization.UnicodeCategory.Surrogate?displayProperty=nameWithType> instead of the category to which the surrogate belongs. For example, the Ugaritic alphabet occupies code points U+10380 to U+1039F. The following example uses the <xref:System.Char.ConvertFromUtf32%2A> method to instantiate a string that represents UGARITIC LETTER ALPA (U+10380), which is the first letter of the Ugaritic alphabet. As the output from the example shows, the <xref:System.Char.IsNumber%28System.Char%29> method returns `false` if it is passed either the high surrogate or the low surrogate of this character.
676
676
@@ -792,7 +792,7 @@ Each version of the Unicode standard includes information on changes to the Unic
792
792
<formattype="text/markdown"><.
795
+
The Unicode characters are divided into categories. A character's category is one of its properties. For example, a character might be an uppercase letter, a lowercase letter, a decimal digit number, a letter number, a connector punctuation, a math symbol, or a currency symbol. The <xref:System.Globalization.UnicodeCategory> enumeration returns the category of a Unicode character. For more information on Unicode characters, see the [Unicode Standard](https://go.microsoft.com/fwlink/?linkid=37123).
796
796
797
797
If the <xref:System.Char> object at position `index` is the first character of a valid surrogate pair, the <xref:System.Globalization.CharUnicodeInfo.GetUnicodeCategory%28System.String%2CSystem.Int32%29> method returns the Unicode category of the surrogate pair instead of returning <xref:System.Globalization.UnicodeCategory.Surrogate?displayProperty=nameWithType>. For example, the Ugaritic alphabet occupies code points U+10380 to U+1039F. The following example uses the <xref:System.Char.ConvertFromUtf32%2A> method to instantiate a string that represents UGARITIC LETTER ALPA (U+10380), which is the first letter of the Ugaritic alphabet. As the output from the example shows, the <xref:System.Globalization.CharUnicodeInfo.GetUnicodeCategory%28System.String%2CSystem.Int32%29> method returns <xref:System.Globalization.UnicodeCategory.OtherLetter?displayProperty=nameWithType> if it is passed the high surrogate of this character, which indicates that it considers the surrogate pair. However, if it is passed the low surrogate, it considers only the low surrogate in isolation and returns <xref:System.Globalization.UnicodeCategory.Surrogate?displayProperty=nameWithType>.
0 commit comments