Alex Walter
2011-06-13 20:47:57 UTC
I'm really confused about this for the find function:
"uppercase letters must be converted to lowercase, and certain
punctuation must be removed. Specifically, all punctuation characters,
[.,!?;:], appearing at the end of a word and all quoting characters,
[’"], appearing at the beginning or end of a word are removed."
Are we supposed to modify the word to the given specifications before
calling find so that find always takes in a properly formatted word? Or
is this supposed be be part of the functionality of the find function
itself?
I initially assumed that we were supposed to modify the word first. But
then when testing the solution executable with "'HeLLo!'" in the input
file and the dictionary empty, the output is:
Words not found in dictionary:
HeLLo
It appears that the case conversion is done in the find function and the
punctuation removal is not. Also, does the output of not found words
happen outside of the find function?
"uppercase letters must be converted to lowercase, and certain
punctuation must be removed. Specifically, all punctuation characters,
[.,!?;:], appearing at the end of a word and all quoting characters,
[’"], appearing at the beginning or end of a word are removed."
Are we supposed to modify the word to the given specifications before
calling find so that find always takes in a properly formatted word? Or
is this supposed be be part of the functionality of the find function
itself?
I initially assumed that we were supposed to modify the word first. But
then when testing the solution executable with "'HeLLo!'" in the input
file and the dictionary empty, the output is:
Words not found in dictionary:
HeLLo
It appears that the case conversion is done in the find function and the
punctuation removal is not. Also, does the output of not found words
happen outside of the find function?