summaryrefslogtreecommitdiffstats
path: root/base/string_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/string_util.h')
-rw-r--r--base/string_util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/string_util.h b/base/string_util.h
index 46269ff..2f0f3d6 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -53,11 +53,15 @@ namespace base {
// s2 > s1 according to a lexicographic comparison.
int strncasecmp(const char* s1, const char* s2, size_t count);
-// Wrapper for vsnprintf that always NUL-terminates and always returns the
+// 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.
int vsnprintf(char* buffer, size_t size, const char* format, va_list arguments);
+// vswprintf always null-terminates, but when truncation occurs, it will either
+// return -1 or the number of characters that would be in an untruncated
+// formatted string. The actual return value depends on the underlying
+// C library's vswprintf implementation.
int vswprintf(wchar_t* buffer, size_t size,
const wchar_t* format, va_list arguments);