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

Unified Diff: base/string_util.h

Issue 10255: Port some files in chrome/common to Linux.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | chrome/common/common.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util.h
===================================================================
--- base/string_util.h (revision 5823)
+++ base/string_util.h (working copy)
@@ -439,6 +439,12 @@
return &((*str)[0]);
}
+inline char16* WriteInto(string16* str, size_t length_including_null) {
+ str->reserve(length_including_null);
+ str->resize(length_including_null - 1);
+ return &((*str)[0]);
+}
+
//-----------------------------------------------------------------------------
// Function objects to aid in comparing/searching strings.
« no previous file with comments | « no previous file | chrome/common/common.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698