public void TestStringSplit() { var buf = new byte[128]; var writer = new WritableBuffer(buf, () => new byte[1024], buff => { }); writer.WriteValue("Hello World! Hello World!"); var newBuf = new byte[1]; Array.Copy(buf, newBuf, 1); var reader = new ReadableBuffer(newBuf); var result = reader.ReadValue(out string value, 25); Assert.False(result.IsRead); var nextBuf = new byte[32]; Array.Copy(buf, result.BytesRead, nextBuf, 0, 32); reader.Reset(nextBuf); result = reader.ReadValue(ref value, result.CharsRead, true); Assert.True(result.IsRead); Assert.Equal("Hello World! Hello World!", value); }