コード例 #1
0
        public void String8_TrimEnd()
        {
            String8 sample = "Interesting   ".TestConvert();

            Assert.AreEqual("Interesting", sample.TrimEnd(UTF8.Space).ToString());
            Assert.AreEqual(sample.ToString(), sample.TrimEnd(UTF8.Tab).ToString());
            Assert.AreEqual(string.Empty, String8.Empty.TrimEnd(UTF8.Space).ToString());
            Assert.AreEqual(string.Empty, "   ".TestConvert().TrimEnd(UTF8.Space).ToString());
            Assert.AreEqual("A", "A   ".TestConvert().TrimEnd(UTF8.Space).ToString());
        }