static String ToString(pbx p) { byte[] v = new byte[p.Length()]; p.RetrieveString(0, v, p.Length()); char[] cv = new char[p.Length()]; for (int i = 0; i < p.Length(); i++) { cv[i] = (char)v[i]; } return(new String(cv)); }
public void TestBiggerSize() { pbx pbuffer = new pbx(); pbuffer.AttachStyles(pbx.CreateStyles(1), null, 0); int lenTest = test.Length(); pbuffer.InsertString(0, test.Data(), lenTest); Assert.AreEqual(pbuffer.Length(), lenTest); for (int n = 0; n < lenTest; n++) { Assert.AreEqual(test.CharAt(n), pbuffer.CharAt(n)); } }