コード例 #1
0
        public void ToStringAndDisposeTest()
        {
            ValueStringBuilder sb = ValueStringBuilder.CreateFrom("Hello World".AsSpan());

            Assert.AreEqual("Hello World", sb.ToStringAndDispose());
            Assert.True(sb.IsEmpty);
            Assert.AreEqual(0, sb.Length);
            Assert.AreEqual(0, sb.Capacity);
        }