OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/stringprintf.h" | |
6 | 5 |
7 #include <errno.h> | |
8 | 6 |
9 #include "base/string_util.h" | 7 |
10 #include "base/utf_string_conversions.h" | 8 #include <stdarg.h> |
| 9 #include <stddef.h> |
| 10 #include <sys/errno.h> |
| 11 #include <string> |
| 12 #include <vector> |
| 13 |
| 14 #include "base/basictypes.h" |
| 15 #include "base/logging.h" |
| 16 #include "base/port.h" |
| 17 #include "base/string_util_posix.h" |
11 | 18 |
12 namespace base { | 19 namespace base { |
13 | 20 |
14 namespace { | 21 namespace { |
15 | 22 |
16 // Overloaded wrappers around vsnprintf and vswprintf. The buf_size parameter | 23 // Overloaded wrappers around vsnprintf and vswprintf. The buf_size parameter |
17 // is the size of the buffer. These return the number of characters in the | 24 // is the size of the buffer. These return the number of characters in the |
18 // formatted string excluding the NUL terminator. If the buffer is not | 25 // formatted string excluding the NUL terminator. If the buffer is not |
19 // large enough to accommodate the formatted string without truncation, they | 26 // large enough to accommodate the formatted string without truncation, they |
20 // return the number of characters that would be in the fully-formatted string | 27 // return the number of characters that would be in the fully-formatted string |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 173 |
167 void StringAppendV(std::string* dst, const char* format, va_list ap) { | 174 void StringAppendV(std::string* dst, const char* format, va_list ap) { |
168 StringAppendVT(dst, format, ap); | 175 StringAppendVT(dst, format, ap); |
169 } | 176 } |
170 | 177 |
171 void StringAppendV(std::wstring* dst, const wchar_t* format, va_list ap) { | 178 void StringAppendV(std::wstring* dst, const wchar_t* format, va_list ap) { |
172 StringAppendVT(dst, format, ap); | 179 StringAppendVT(dst, format, ap); |
173 } | 180 } |
174 | 181 |
175 } // namespace base | 182 } // namespace base |
OLD | NEW |