the function cleans the any extracharacters before the word but i dont know what to do for characters after the word.
so if you know what to do in second while loop let me know!
std::string clean(std::string inputstr)
{
std::string extrachar = "!@#$%^&*()_-+={}[]:;\"\'`<>,.?/|\\";
while(inputstr.find_first_of(extrachar) == 0)
{
inputstr=inputstr.substr(1);
}
while(inputstr.find_last_of(extrachar)== 0)
{
}