public IActionResult GetMaxWord(string string_sentence)
        {
            Sentence sentence = new Sentence
            {
                SentencePhrase = string_sentence,

                WordsList = _stringManipulationService.GetWordsList(string_sentence),
            };

            sentence.WordMax = _stringManipulationService.GetMaxWord(sentence.WordsList);

            return(Ok(sentence));
        }
Example #2
0
        public IActionResult MaxWord(string inputSentence)
        {
            //assume string will not be empty.
            Sentence sentence = new Sentence
            {
                SentencePhrase = inputSentence,

                WordsList = _stringManipulationService.GetWordsList(inputSentence),
            };

            sentence.WordMax = _stringManipulationService.GetMaxWord(sentence.WordsList);

            return(PartialView("_MaxWordPartial", sentence));
        }