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

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: Incorporated Vaclav's 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
« no previous file with comments | « no previous file | base/strings/string_util.cc » ('j') | base/strings/string_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
danakj 2015/04/02 18:31:42 why size_type and not size_t like everything else
Pritam Nikam 2015/04/06 06:13:10 Done. IMO, using size_type keeps it consistent fo
+ 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') | base/strings/string_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698