*** empty log message ***
[m17n/m17n-lib-cs.git] / chartab.cs
index 78e2a29..7262d93 100644 (file)
@@ -16,6 +16,7 @@ public class Test
     tbl[0x1000] = MSymbol.Of ("test-1000");
 
     tbl[0x2070, 0x4001] = MSymbol.t;
+    tbl[0x3740] = MSymbol.nil;
 
     Console.WriteLine ("# Direct access by tbl[CHAR]");
     Console.WriteLine ("0x100:{0}, 0x1000:{1}", tbl[0x100], tbl[0x1000]);
@@ -26,10 +27,23 @@ public class Test
     foreach (MCharRange range in tbl)
       Console.WriteLine (range);
 
-    Console.WriteLine ("# Using CharRange from U+3000 to U+0");
+    Console.WriteLine ("# Using MCharRange from U+3000 to U+0");
     MCharRange r = new MCharRange (0x3000, tbl);
     do {
-      Console.WriteLine (r);
+      if (r.Value != null)
+       Console.WriteLine (r);
     } while (r.Prev ());
+
+    Console.WriteLine ("# Using MCharProp of BIDI");
+    MDatabase.ApplicationDir = "/usr/local/share/m17n";
+    MCharProp bidi = new MCharProp (MSymbol.Of ("bidirectional-category"));
+    r = new MCharRange (0, bidi);
+    while (r.To < 0x800)
+      {
+       if (r.Value != null)
+         Console.WriteLine (r);
+       r.Next ();
+      }
+    Console.WriteLine ("...");
   }
 }