Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 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));
        }