summaryrefslogtreecommitdiffstats
path: root/base/string_util.h
diff options
context:
space:
mode:
authormmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-13 01:17:18 +0000
committermmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-13 01:17:18 +0000
commit703f427ed4c2e067d95890f8edbbbdc29fc62e1d (patch)
tree61ec76f580c34d5034a820faf5829b016aa244c3 /base/string_util.h
parent856ab444ba32f086519a0db875e716844c060560 (diff)
downloadchromium_src-703f427ed4c2e067d95890f8edbbbdc29fc62e1d.zip
chromium_src-703f427ed4c2e067d95890f8edbbbdc29fc62e1d.tar.gz
chromium_src-703f427ed4c2e067d95890f8edbbbdc29fc62e1d.tar.bz2
Fix string_util and its tests for the Mac, GCC, UTF-32 wchar_t platforms, and POSIX systems generally.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@771 0039d316-1c4b-4281-b951-d872f2087c98
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);