Overloaded wrappers around vsnprintf and vswprintf. The buf_size parameter is the size of the buffer. These return the number of characters in the formatted string excluding the NUL terminator. If the buffer is not large enough to accommodate the formatted string without truncation, they return the number of characters that would be in the fully-formatted string (vsnprintf, and vswprintf on Window
| 27 | // return the number of characters that would be in the fully-formatted string |
| 28 | // (vsnprintf, and vswprintf on Windows), or -1 (vswprintf on POSIX platforms). |
| 29 | inline int vsnprintfT(char* buffer, |
| 30 | size_t buf_size, |
| 31 | const char* format, |
| 32 | va_list argptr) { |
| 33 | return butil::vsnprintf(buffer, buf_size, format, argptr); |
| 34 | } |
| 35 | |
| 36 | #if !defined(OS_ANDROID) |
| 37 | inline int vsnprintfT(wchar_t* buffer, |
no test coverage detected