Skip to content

rustdoc's for str are unclear #22902

@brson

Description

@brson

As reported https://www.reddit.com/r/rust/comments/2xggd2/where_are_the_docs_for_str/

"I'd like to create a program that works with strings.

However, I could not find any documentation that described what functions I could call on str or string. Example:

http://doc.rust-lang.org/std/str/

The rust documentation for str defines Structs, Enums, Traits and 3 Functions.

So... I'm lost. This isn't like any documentation for any other language I'm familiar with. For example, when I view the java documentation for String I get a list of every method I can call on the String.

I can not find such a list for str.

Let's say I want to search a str or run a regex against it.

I looked in the Searcher trait, but there are no useful methods/functions for searching that I could see. The trait description is: This trait provides methods for searching for non-overlapping matches of a pattern starting from the front (left) of a string.

I see no way to define a pattern or even search.

I'm obviously totally missing it. Please help."

A good starting point might be to copy the text from http://doc.rust-lang.org/std/primitive.str.html into it, link explicitly to StrExt, and explain what StrExt is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions