R
Rick
I have a program that reads from a file. In the file are a series of
words. I read in all the words into a string array, find the average
length, count the number of words, display the longest word and how long
it is, and display the smallest word and how long it is. All that is
working fine, but what I need to do it format certain words that contain
a period at the end of them (ex: a word at the end of a sentence), words
with quotes around them, exclamation points, etc. If a word has one of
these characters anywhere but the beginning or end it is ok. Also, say
you have this word: one." It needs to be changed to: one
The word: don't is ok because the "'" isn't at the beginning or end.
words. I read in all the words into a string array, find the average
length, count the number of words, display the longest word and how long
it is, and display the smallest word and how long it is. All that is
working fine, but what I need to do it format certain words that contain
a period at the end of them (ex: a word at the end of a sentence), words
with quotes around them, exclamation points, etc. If a word has one of
these characters anywhere but the beginning or end it is ok. Also, say
you have this word: one." It needs to be changed to: one
The word: don't is ok because the "'" isn't at the beginning or end.