2 using System.Globalization;
5 namespace Mono.Globalization.Unicode
7 internal /*static*/ class NormalizationTableUtil
9 public static readonly CodePointIndexer prop;
10 public static readonly CodePointIndexer map;
12 static NormalizationTableUtil ()
14 int [] propStarts = new int [] {
15 0, 0xAC00, 0xF900, 0x1D100,
18 int [] propEnds = new int [] {
19 0x3400, 0xD7AF, 0x10000, 0x1D800,
22 int [] mapStarts = new int [] {
23 0, 0xF900, 0x1d150, 0x2f800
25 int [] mapEnds = new int [] {
26 0x3400, 0x10000, 0x1d800, 0x2fb00
29 prop = new CodePointIndexer (propStarts, propEnds, 0, 0);
30 map = new CodePointIndexer (mapStarts, mapEnds, 0, 0);
33 public static int PropIdx (int cp)
35 return prop.ToIndex (cp);
38 public static int PropCP (int index)
40 return prop.ToCodePoint (index);
43 public static int PropCount { get { return prop.TotalCount; } }
45 public static int MapIdx (int cp)
47 return map.ToIndex (cp);
50 public static int MapCP (int index)
52 return map.ToCodePoint (index);
55 public static int MapCount { get { return map.TotalCount; } }