Is there a c++ std:: function that will trim trailing spaces from std::string? I know how to do it myself, but I was wondering if anyone knows of something in <altorithms> or elsewhere?

Thanks