diff options
author | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 18:48:58 +0000 |
---|---|---|
committer | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 18:48:58 +0000 |
commit | 60632023552251e52b1948724e28a93d595cb72e (patch) | |
tree | 0ae64732e2659331eb26659d6c0d2ebaf1073d20 /base/string_util.h | |
parent | b8c541b9d4f8769f5a191340f479c957f9886b38 (diff) | |
download | chromium_src-60632023552251e52b1948724e28a93d595cb72e.zip chromium_src-60632023552251e52b1948724e28a93d595cb72e.tar.gz chromium_src-60632023552251e52b1948724e28a93d595cb72e.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@736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r-- | base/string_util.h | 6 |
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); |