| Index: base/string_util.h
|
| ===================================================================
|
| --- base/string_util.h (revision 2710)
|
| +++ base/string_util.h (working copy)
|
| @@ -33,6 +33,9 @@
|
| // s2 > s1 according to a lexicographic comparison.
|
| int strncasecmp(const char* s1, const char* s2, size_t count);
|
|
|
| +// Wrapper for swscanf.
|
| +int vswscanf(const wchar_t* ws, const wchar_t* format, va_list arguments);
|
| +
|
| // Wrapper for vsnprintf that always null-terminates and always returns the
|
| // number of characters that would be in an untruncated formatted
|
| // string, even when truncation occurs.
|
| @@ -47,6 +50,14 @@
|
|
|
| // Some of these implementations need to be inlined.
|
|
|
| +inline int swscanf(const wchar_t* ws, const wchar_t* format, ...) {
|
| + va_list arguments;
|
| + va_start(arguments, format);
|
| + int result = vswscanf(ws, format, arguments);
|
| + va_end(arguments);
|
| + return result;
|
| +}
|
| +
|
| inline int snprintf(char* buffer, size_t size, const char* format, ...) {
|
| va_list arguments;
|
| va_start(arguments, format);
|
|
|