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

Unified Diff: third_party/WebKit/Source/wtf/text/AtomicString.h

Issue 2226363003: Use StringView for String::reverseFind. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | third_party/WebKit/Source/wtf/text/StringImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/AtomicString.h
diff --git a/third_party/WebKit/Source/wtf/text/AtomicString.h b/third_party/WebKit/Source/wtf/text/AtomicString.h
index 2dc75a75f35ef7499262a59cca3aedf2f9ae93e6..697ac226a6a69e251fae7d69d491a3598f0646ef 100644
--- a/third_party/WebKit/Source/wtf/text/AtomicString.h
+++ b/third_party/WebKit/Source/wtf/text/AtomicString.h
@@ -90,6 +90,12 @@ public:
bool contains(const StringView& value, TextCaseSensitivity caseSensitivity = TextCaseSensitive) const
{ return find(value, 0, caseSensitivity) != kNotFound; }
+ // Find the last instance of a single character or string.
+ size_t reverseFind(UChar c, unsigned start = UINT_MAX) const
+ { return m_string.reverseFind(c, start); }
+ size_t reverseFind(const StringView& value, unsigned start = UINT_MAX) const
+ { return m_string.reverseFind(value, start); }
+
bool startsWith(const StringView& prefix, TextCaseSensitivity caseSensitivity = TextCaseSensitive) const
{ return m_string.startsWith(prefix, caseSensitivity); }
bool startsWith(UChar character) const
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/StringImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698