OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" | 5 #include "base/stringprintf.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 | 8 |
9 #include "base/scoped_clear_errno.h" | 9 #include "base/scoped_clear_errno.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Overloaded wrappers around vsnprintf and vswprintf. The buf_size parameter | 17 // Overloaded wrappers around vsnprintf and vswprintf. The buf_size parameter |
18 // is the size of the buffer. These return the number of characters in the | 18 // is the size of the buffer. These return the number of characters in the |
19 // formatted string excluding the NUL terminator. If the buffer is not | 19 // formatted string excluding the NUL terminator. If the buffer is not |
20 // large enough to accommodate the formatted string without truncation, they | 20 // large enough to accommodate the formatted string without truncation, they |
21 // return the number of characters that would be in the fully-formatted string | 21 // return the number of characters that would be in the fully-formatted string |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 StringAppendVT(dst, format, ap); | 177 StringAppendVT(dst, format, ap); |
178 } | 178 } |
179 | 179 |
180 #if !defined(OS_ANDROID) | 180 #if !defined(OS_ANDROID) |
181 void StringAppendV(std::wstring* dst, const wchar_t* format, va_list ap) { | 181 void StringAppendV(std::wstring* dst, const wchar_t* format, va_list ap) { |
182 StringAppendVT(dst, format, ap); | 182 StringAppendVT(dst, format, ap); |
183 } | 183 } |
184 #endif | 184 #endif |
185 | 185 |
186 } // namespace base | 186 } // namespace base |
OLD | NEW |