March 2004
Intermediate to advanced
560 pages
26h 47m
English
using System;
using System.Globalization;
namespace Samples
{
public class UnicodeCategorySample
{
public static void Main()
{
string s = "Pi is (\u03a0)!";
Console.WriteLine("In string: {0}", s);
foreach(char c in s)
Console.WriteLine(
"Unicode category of Char '{0}' value: {1} is {2}",
c, (int) c, Char.GetUnicodeCategory(c));
}
}
}
C In string: Pi is ()! Unicode category of Char 'P' value: 80 is UppercaseLetter Unicode category of Char 'i' value: 105 is LowercaseLetter Unicode category of Char ' ' value: 32 is SpaceSeparator Unicode category of Char 'i' value: 105 is LowercaseLetter Unicode category of Char 's' value: 115 is LowercaseLetter Unicode category of Char ' ' value: 32 is SpaceSeparator Unicode category of Char ...
Read now
Unlock full access