| // Copyright 2013 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // |
| // This file defines utility functions for working with strings. |
| |
| #ifndef BASE_STRINGS_STRING_UTIL_H_ |
| #define BASE_STRINGS_STRING_UTIL_H_ |
| |
| #include "base/basictypes.h" |
| |
| // Returns true if the string passed in matches the pattern. The pattern |
| // string can contain wildcards like * and ? |
| // The backslash character (\) is an escape character for * and ? |
| // We limit the patterns to having a max of 16 * or ? characters. |
| // ? matches 0 or 1 character, while * matches 0 or more characters. |
| bool MatchPattern(const std::string& string, |
| const std::string& pattern); |
| |
| #endif // BASE_STRINGS_STRING_UTIL_H_ |