Skip to content

std::str::pattern::Pattern documentation #45507

Closed

Description

@jethrogb

Correct me if I'm wrong, but I don't think it's possible to find out from the currently available online documentation if the following code returns true or false:

"ab".contains(&['b', 'a'][..])

Is searching for a slice of chars the same as searching for the string of the contatenation? Or is this a set match?

There is no information on this in the following places:

Activity

  1. added
    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
    on Oct 30, 2017
  2. Freyskeyd commented on Nov 6, 2017

    @Freyskeyd
    Contributor

    If no one is working on it I would be happy to update this.

  3. frewsxcv commented on Feb 11, 2018

    @frewsxcv
    Contributor

    @Freyskeyd did you make any progress on this or is it alright for others to work on it?

  4. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    on Feb 12, 2018
  5. added
    E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.
    on May 29, 2018
  6. Emerentius commented on Jun 6, 2018

    @Emerentius
    Contributor

    I think it'd be best if the explanation is put on the page of std::str::pattern::Pattern (and not on the respective impls) so that it is easy to lookup in a central position.
    A small table and some examples should do such as the ones I've written over here.

    I don't know how to do a sanity check compile. Apparently I need to compile all of rustc(?!) to get the docs, which is not feasible for me. If anybody would like to send the PR, they can use my branch as a base. Maybe improve the wording as well.

  7. added a commit that references this issue on Jun 13, 2020
    22c222f
  8. added 5 commits that reference this issue on Jun 13, 2020
    5710667
    fead5f8
    1f14b08
    a94303c
    30abb65
  9. added a commit that references this issue on Jun 13, 2020
    2cc2672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.P-mediumMedium priorityT-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions