diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-14 10:56:57 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-14 10:56:57 -0700 |
| commit | ae7959d298c95d5ffdeae8e7c3f3659d7fc28cdb (patch) | |
| tree | 575fb3a8174b9103d9976f8f665c75e0922ccb1b /src/libcore/str | |
| parent | 7913f5659d2dd8e8de74d25ad2594b219aa460cc (diff) | |
| parent | 6fa16d6a473415415cb87a1fe6754aace32cbb1c (diff) | |
| download | rust-ae7959d298c95d5ffdeae8e7c3f3659d7fc28cdb.tar.gz rust-ae7959d298c95d5ffdeae8e7c3f3659d7fc28cdb.zip | |
rollup merge of #24377: apasel422/docs
Conflicts: src/libstd/net/ip.rs src/libstd/sys/unix/fs.rs src/libstd/sys/unix/mod.rs src/libstd/sys/windows/mod.rs
Diffstat (limited to 'src/libcore/str')
| -rw-r--r-- | src/libcore/str/pattern.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs index 9f701e1b031..62b693dcbe6 100644 --- a/src/libcore/str/pattern.rs +++ b/src/libcore/str/pattern.rs @@ -32,17 +32,17 @@ pub trait Pattern<'a>: Sized { /// Associated searcher for this pattern type Searcher: Searcher<'a>; - /// Construct the associated searcher from + /// Constructs the associated searcher from /// `self` and the `haystack` to search in. fn into_searcher(self, haystack: &'a str) -> Self::Searcher; - /// Check whether the pattern matches anywhere in the haystack + /// Checks whether the pattern matches anywhere in the haystack #[inline] fn is_contained_in(self, haystack: &'a str) -> bool { self.into_searcher(haystack).next_match().is_some() } - /// Check whether the pattern matches at the front of the haystack + /// Checks whether the pattern matches at the front of the haystack #[inline] fn is_prefix_of(self, haystack: &'a str) -> bool { match self.into_searcher(haystack).next() { @@ -51,7 +51,7 @@ pub trait Pattern<'a>: Sized { } } - /// Check whether the pattern matches at the back of the haystack + /// Checks whether the pattern matches at the back of the haystack #[inline] fn is_suffix_of(self, haystack: &'a str) -> bool where Self::Searcher: ReverseSearcher<'a> |
