Add uppercase letters

This commit is contained in:
2019-11-24 20:00:41 +01:00
parent 20e0791ac8
commit 8fe92e6543

View File

@@ -3,7 +3,7 @@
std::string reverse_letter(const std::string &str)
{
std::string alphabet ("abcdefghijklmnopqrstuvwxyz");
std::string alphabet ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
std::string result ("");
for (int i = str.length() - 1; i >= 0; i--){
if (alphabet.find(str[i]) != std::string::npos){