diff options
Diffstat (limited to 'base/string_util.h')
-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. |