Exemple #1
0
        public void StringRemove()
        {
            //                   00000000000111111111222222
            //                   01234567890123456789012345
            const string text     = "Lorem ipsum dolor sit amet";
            const string expected = "Lorem ipsum";

            Assert.AreEqual(expected, String2.Remove(text, 11));
            Assert.AreEqual("", String2.Remove(text, 0));
            Assert.AreEqual(text.Substring(0, text.Length - 1), String2.Remove(text, text.Length - 1));
        }