예제 #1
0
        public String EveryTenthWord()
        {
            List <String>   list       = new List <String>();
            MatchCollection collection = WordsCollectionMaker.TakeWordsCollection(Text);

            for (int i = 9; i < collection.Count; i += 10)
            {
                list.Add(collection[i].Value);
            }
            return(String.Join(", ", list));
        }
        public String ThirdSentenceReverse()
        {
            sentence = TakeSentencesCollection(Text)[2];
            MatchCollection coll = WordsCollectionMaker.TakeWordsCollection(sentence);

            for (int i = 0; i < coll.Count; i++)
            {
                String word = coll[i].Value;
                sentence = sentence.Replace(word, new string(word.ToCharArray().Reverse().ToArray()));
            }
            return(sentence);
        }
예제 #3
0
 public int WordCounter()
 {
     return(WordsCollectionMaker.TakeWordsCollection(Text).Count);
 }