diff options
| author | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
|---|---|---|
| committer | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
| commit | 64d2a7c8945ba05af859901f5e248f1befdd8621 (patch) | |
| tree | 013fcb7e9e3296ecdda876012252c36bd6bcb063 /src/pkg/regexp/regexp.go | |
| parent | b901efe83e212f0c34c769c079e41373da12d723 (diff) | |
| download | golang-64d2a7c8945ba05af859901f5e248f1befdd8621.tar.gz | |
Imported Upstream version 1.2upstream/1.2
Diffstat (limited to 'src/pkg/regexp/regexp.go')
| -rw-r--r-- | src/pkg/regexp/regexp.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index c392b376f..0046026ea 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -375,21 +375,18 @@ func (re *Regexp) LiteralPrefix() (prefix string, complete bool) { return re.prefix, re.prefixComplete } -// MatchReader returns whether the Regexp matches the text read by the -// RuneReader. The return value is a boolean: true for match, false for no -// match. +// MatchReader reports whether the Regexp matches the text read by the +// RuneReader. func (re *Regexp) MatchReader(r io.RuneReader) bool { return re.doExecute(r, nil, "", 0, 0) != nil } -// MatchString returns whether the Regexp matches the string s. -// The return value is a boolean: true for match, false for no match. +// MatchString reports whether the Regexp matches the string s. func (re *Regexp) MatchString(s string) bool { return re.doExecute(nil, nil, s, 0, 0) != nil } -// Match returns whether the Regexp matches the byte slice b. -// The return value is a boolean: true for match, false for no match. +// Match reports whether the Regexp matches the byte slice b. func (re *Regexp) Match(b []byte) bool { return re.doExecute(nil, b, "", 0, 0) != nil } |
