use tolower() instead of toupper() in that loop, then just use touper() on the first letter of the first word.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
If the text contains more than one sentence, first locate the end of the first sentence by locating the normal end-of-sentence terminators (period, question mark, exclamation mark). Then the first word following that is the start of the next sentence.
strpbrk() function will help locate the end-of-sentence.
char *end_of_sentence = strchr(textline, ".?!");
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343