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

Unified Diff: third_party/re2/re2/stringpiece.h

Issue 1516543002: Update re2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated update instructions Created 5 years 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 | « third_party/re2/re2/simplify.cc ('k') | third_party/re2/re2/stringpiece.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/re2/stringpiece.h
diff --git a/third_party/re2/re2/stringpiece.h b/third_party/re2/re2/stringpiece.h
index 38a515097be43078bc21af8f40a1bf0e8eb3d41c..1479d1ac6137d13396507fa2c9bd768b2a79af96 100644
--- a/third_party/re2/re2/stringpiece.h
+++ b/third_party/re2/re2/stringpiece.h
@@ -20,12 +20,10 @@
#define STRINGS_STRINGPIECE_H__
#include <string.h>
+#include <algorithm>
#include <cstddef>
#include <iosfwd>
#include <string>
-#ifdef WIN32
-#include <algorithm>
-#endif
namespace re2 {
@@ -139,15 +137,17 @@ class StringPiece {
int max_size() const { return length_; }
int capacity() const { return length_; }
- int copy(char* buf, size_type n, size_type pos = 0) const;
+ size_type copy(char* buf, size_type n, size_type pos = 0) const;
- int find(const StringPiece& s, size_type pos = 0) const;
- int find(char c, size_type pos = 0) const;
- int rfind(const StringPiece& s, size_type pos = npos) const;
- int rfind(char c, size_type pos = npos) const;
+ bool contains(StringPiece s) const;
+
+ size_type find(const StringPiece& s, size_type pos = 0) const;
+ size_type find(char c, size_type pos = 0) const;
+ size_type rfind(const StringPiece& s, size_type pos = npos) const;
+ size_type rfind(char c, size_type pos = npos) const;
StringPiece substr(size_type pos, size_type n = npos) const;
-
+
static bool _equal(const StringPiece&, const StringPiece&);
};
« no previous file with comments | « third_party/re2/re2/simplify.cc ('k') | third_party/re2/re2/stringpiece.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698