diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 20:50:39 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 20:50:39 +0000 |
commit | 933cc00eb856db684b9e64b7486ca20edbb2c3ea (patch) | |
tree | c7be5057c42ffb82e38d6fc421c0be524a2af7a1 /base | |
parent | d232c09f2584c80b6fde6b987fac32c8de57bfd7 (diff) | |
download | chromium_src-933cc00eb856db684b9e64b7486ca20edbb2c3ea.zip chromium_src-933cc00eb856db684b9e64b7486ca20edbb2c3ea.tar.gz chromium_src-933cc00eb856db684b9e64b7486ca20edbb2c3ea.tar.bz2 |
Port some files in chrome/common to Linux.
BUG=3649
Review URL: http://codereview.chromium.org/10255
Patch from Paweł Hajdan jr <phajdan.jr@gmail.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/string_util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/string_util.h b/base/string_util.h index 71c4991..1c936b7 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -439,6 +439,12 @@ inline char_type* WriteInto( 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. |