return mt;
}
+ public override string ToString ()
+ {
+ return sb.ToString ();
+ }
+
private static bool surrogate_high_p (char c)
{
return (c >= 0xD800 && c < 0xDC00);
set {
i = pos_to_idx (this, i);
if (value < 0x10000)
- sb[i] = (char) value;
+ {
+ if (surrogate_high_p (sb[i]))
+ sb.Remove (i, 1);
+ sb[i] = (char) value;
+ }
else
{
char high = (char) (0xD800 + ((i - 0x10000) >> 10));
Console.WriteLine (mt[1]);
Console.WriteLine (mt[2]);
Console.WriteLine (mt[3]);
+ Console.WriteLine (mt + new MText ("漢字"));
+ mt[1] = 'b';
+ Console.WriteLine (mt);
+ mt[1] = 0x1d100;
+ Console.WriteLine (mt);
}
}