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

Unified Diff: base/strings/string_util.h

Issue 962673004: [Autofill/Autocomplete Feature] Substring matching instead of prefix matching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses review comments. Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: base/strings/string_util.h
diff --git a/base/strings/string_util.h b/base/strings/string_util.h
index 5ab2ad5d5477f2a648aa081dda0ad2a5e859754d..3d9ac83da1ab1562515942f153bc8f2d3d063efe 100644
--- a/base/strings/string_util.h
+++ b/base/strings/string_util.h
@@ -500,6 +500,12 @@ BASE_EXPORT bool MatchPattern(const base::StringPiece& string,
BASE_EXPORT bool MatchPattern(const base::string16& string,
const base::string16& pattern);
+// Returns offset to the beginning of first occurence of |search| in the |str|.
+// If no such subsequence is found, |base::string16::npos| is returned.
+BASE_EXPORT base::string16::size_type StartsAt(const base::string16& str,
Evan Stade 2015/03/31 21:41:52 I think you want to call this Find. You'll need a
+ const base::string16& search,
+ bool case_sensitive);
+
// Hack to convert any char-like type to its unsigned counterpart.
// For example, it will convert char, signed char and unsigned char to unsigned
// char.
« no previous file with comments | « no previous file | base/strings/string_util.cc » ('j') | components/autofill/content/renderer/form_autofill_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698