100-exercises-to-learn-rust icon indicating copy to clipboard operation
100-exercises-to-learn-rust copied to clipboard

04/Traits/07_Deref std::String::trim

Open egreglee opened this issue 10 months ago • 0 comments

04/Traits/07_Deref says:

// TODO: whenever title and description are returned via their accessor methods, they // should be normalized—i.e. leading and trailing whitespace should be removed. // There is a method in Rust's standard library that can help with this, but you won't // find it in the documentation for String. // Can you figure out where it is defined and how to use it?

This method appears to be in String:

std::String::trim

egreglee avatar Jan 16 '25 02:01 egreglee