added a special case for the word "I" to not make "way" uppercase

compileTime
John Jekel 5 years ago
parent f4d659f978
commit 529ace1402
  1. 10
      include/anslatortray.hpp

@ -174,7 +174,7 @@ namespace anslatortray
//capatilization handeling
if (std::all_of(std::begin(actualWord), std::end(actualWord), isupper))//if entire original word was uppercase//fixme why no std::toupper
if (std::all_of(std::begin(actualWord), std::end(actualWord), isupper) && actualWord != "I")//if entire original word was uppercase (except for the word "I")//fixme why no std::toupper
std::transform(std::begin(pig), std::end(pig), std::begin(pig), toupper);//make entire translated word uppercase
else
{
@ -315,14 +315,6 @@ namespace anslatortray
newWords += {" "};
}
*/
/* not worth the hassle of setting up a range
for (auto word : std::istream_iterator<std::string>{wordStream})
{
pigWords += wordToPig(word);
}
*/
}
}

Loading…
Cancel
Save