I have a char str which contains a sequence of characters with a blank space at the end.
I want to remove the blank space.
str contains: "Pokemons are great "
I want to change it to
"Pokemons are great"
Notice that the string doesn't end with a white space.
What function can do this?