Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: base/strings/pattern.h

Issue 1226673003: Move MatchPattern to its own header and the base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/base.gypi ('k') | base/strings/pattern.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_STRINGS_PATTERN_H_
6 #define BASE_STRINGS_PATTERN_H_
7
8 #include "base/base_export.h"
9 #include "base/strings/string_piece.h"
10
11 namespace base {
12
13 // Returns true if the string passed in matches the pattern. The pattern
14 // string can contain wildcards like * and ?
15 //
16 // The backslash character (\) is an escape character for * and ?
17 // We limit the patterns to having a max of 16 * or ? characters.
18 // ? matches 0 or 1 character, while * matches 0 or more characters.
19 BASE_EXPORT bool MatchPattern(const StringPiece& string,
20 const StringPiece& pattern);
21 BASE_EXPORT bool MatchPattern(const StringPiece16& string,
22 const StringPiece16& pattern);
23
24 } // namespace base
25
26 #endif // BASE_STRINGS_PATTERN_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/strings/pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698