2 using System.Collections.Generic;
9 public static void Main()
11 MCharTable tbl = new MCharTable ();
13 tbl[0x100] = MSymbol.Of ("test-100");
14 tbl[0x101] = MSymbol.Of ("test-101");
15 tbl[0xFFF] = MSymbol.Of ("test-FFF");
16 tbl[0x1000] = MSymbol.Of ("test-1000");
18 tbl[0x2070, 0x4001] = MSymbol.t;
19 tbl[0x3740] = MSymbol.nil;
21 Console.WriteLine ("# Direct access by tbl[CHAR]");
22 Console.WriteLine ("0x100:{0}, 0x1000:{1}", tbl[0x100], tbl[0x1000]);
23 Console.WriteLine ("0x206F:{0}, 0x2070:{1}, 0x4001:{2}, 0x4002:{3}",
24 tbl[0x206F], tbl[0x2070], tbl[0x4001], tbl[0x4002]);
26 Console.WriteLine ("# Enumerate on tbl");
27 foreach (MCharRange range in tbl)
28 Console.WriteLine (range);
30 Console.WriteLine ("# Using MCharRange from U+3000 to U+0");
31 MCharRange r = new MCharRange (0x3000, tbl);
34 Console.WriteLine (r);
37 Console.WriteLine ("# Using MCharProp of BIDI");
38 MDatabase.ApplicationDir = "/usr/local/share/m17n";
39 MCharProp bidi = new MCharProp (MSymbol.Of ("bidirectional-category"));
40 r = new MCharRange (0, bidi);
44 Console.WriteLine (r);
47 Console.WriteLine ("...");