*** empty log message ***
[m17n/m17n-lib-cs.git] / MText.cs
index a48b556..b281808 100644 (file)
--- a/MText.cs
+++ b/MText.cs
@@ -227,6 +227,16 @@ namespace M17N.Core
 
     public override string ToString () { return sb.ToString (); }
 
+    public static implicit operator MText (string str)
+    {
+      return new MText (str);
+    }
+
+    public static explicit operator string (MText mt)
+    {
+      return mt.ToString ();
+    }
+
     private static int inc_idx (StringBuilder sb, int i)
     {
       return (i + (Char.IsHighSurrogate (sb[i]) ? 2 : 1));
@@ -462,6 +472,11 @@ namespace M17N.Core
       return this;
     }
 
+    public MText Del ()
+    {
+      return Del (0, Length);
+    }
+
     public MText Del (int from, int to)
     {
       if (check_range (from, to, true))