How to use strip_suffix() to strip multiple chars?

Hello, I recently started using Rust and so far I'm enjoying it!

I have a Vec<&str>, elements are like apple., banana"?, pears".. I intend to remove extra ., ", ? punctuations. How do I do it without checking each char?

Thank you!

Use trim_end_matches instead.

1 Like

That's what I need! Thanks for the speedy reply.