fork download
#include 
#include 

std::string isolate_word(const std::string &word) {
    std::string isolated_word;
    for(auto iter = word.cbegin(); iter != word.cend(); ++iter) {
        if(!std::ispunct(*iter)) {
            isolated_word+=std::tolower(*iter);
        }
    }
    return isolated_word;
}

int main(void) {
    std::cout << isolate_word("(,he,llo,)") << '\n';
    return 0;
}
Success #stdin #stdout 0s 3028KB
stdin
Standard input is empty
stdout
hello