Skip to content

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

Open
@egreglee

Description

@egreglee

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions