Commit 529ace14 authored by John Jekel's avatar John Jekel
Browse files

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

parent f4d659f9
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -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);
        }
        */
    }
}