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

Unified Diff: base/string_util.cc

Issue 10386016: Modify ui::ElideRectangleText() to honor trailing newlines. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | ui/base/text/text_elider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util.cc
===================================================================
--- base/string_util.cc (revision 136913)
+++ base/string_util.cc (working copy)
@@ -386,11 +386,7 @@
}
bool ContainsOnlyWhitespace(const string16& str) {
- for (string16::const_iterator i(str.begin()); i != str.end(); ++i) {
- if (!IsWhitespace(*i))
- return false;
- }
- return true;
+ return str.find_first_not_of(kWhitespaceUTF16) == string16::npos;
}
template<typename STR>
« no previous file with comments | « no previous file | ui/base/text/text_elider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698