Example #1
0
        static void Main(string[] args)
        {
            Text     text1 = new Text();
            MyString str1  = new MyString(" First text line");

            text1.addStr(str1);
            text1.addStr(new MyString("Second   text  line "));
            text1.addStr(new MyString(" Third text line"));
            text1.printText();
            Console.WriteLine("=====================================");
            Console.WriteLine("Percent of consonants letters in text: " + text1.persentOfConsonants());
            text1.deleteFirstSpaces();
            Console.WriteLine("Spaces on the start were deleted");
            text1.deleteLastSpaces();
            Console.WriteLine("Spaces in the end were deleted");
            text1.printText();
            Console.WriteLine("=====================================");
            text1.deleteSpaces();
            Console.WriteLine("Repetitive spaces were deleted");
            text1.printText();
            Console.WriteLine("=====================================");
            Console.WriteLine("Percent of consonants letters in text: " + text1.persentOfConsonants());
            Console.ReadLine();
        }
Example #2
0
 public void addStr(MyString str)
 {
     text.Add(str);
 }
Example #3
0
 public void deleteStr(MyString str)
 {
     text.Remove(str);
 }