public static MText operator+ (MText mt1, MText mt2)
{
- return new MText (mt1.sb + mt2.sb);
+ MText mt = new MText (mt1.sb);
+
+ mt.sb.Append (mt2.sb);
+ mt.nchars = mt1.nchars + mt2.nchars;
+ return mt;
}
private static bool surrogate_high_p (char c)
return i;
}
+ private readonly bool readonlyp;
+
+ private void insert (int pos, MText mt2, int from, int to)
+ {
+ if (pos != cache_pos)
+ pos = pos_to_idx (pos);
+
+ }
+
public int this[int i]
{
set {
: sb[i]);
}
}
+
+ public MText dup ()
+ {
+ return (new MText (this.sb));
+ }
+
+ public MText ins (int pos, MText mt)
+ {
+ insert (pos, mt, 0, mt.nchars);
+ return this;
+ }
+
+ public MText ins (int pos, MText mt, int from, int to)
+ {
+ insert (pos, mt, from, to);
+ return this;
+ }
}
public class MTextProperty