diff options
author | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 21:09:46 +0000 |
---|---|---|
committer | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 21:09:46 +0000 |
commit | add87a1d5c6a768338193b739160588d960e29c7 (patch) | |
tree | 02284c4a064f430e39413b865fec821177628544 /base | |
parent | 4eb516f4c353b296bd20efa6085c41f0dd7e8403 (diff) | |
download | chromium_src-add87a1d5c6a768338193b739160588d960e29c7.zip chromium_src-add87a1d5c6a768338193b739160588d960e29c7.tar.gz chromium_src-add87a1d5c6a768338193b739160588d960e29c7.tar.bz2 |
Clarify comments for |RemoveChars()| and |TrimString()| that the char array param must be null terminated.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/8396009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107198 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/string_util.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/string_util.h b/base/string_util.h index a0e554d..740124f 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -173,8 +173,8 @@ BASE_EXPORT extern const char kWhitespaceASCII[]; BASE_EXPORT extern const char kUtf8ByteOrderMark[]; -// Removes characters in remove_chars from anywhere in input. Returns true if -// any characters were removed. +// Removes characters in |remove_chars| from anywhere in input. Returns true if +// any characters were removed. |remove_chars| must be null-terminated. // NOTE: Safe to use the same variable for both input and output. BASE_EXPORT bool RemoveChars(const string16& input, const char16 remove_chars[], @@ -183,7 +183,8 @@ BASE_EXPORT bool RemoveChars(const std::string& input, const char remove_chars[], std::string* output); -// Removes characters in trim_chars from the beginning and end of input. +// Removes characters in |trim_chars| from the beginning and end of input. +// |trim_chars| must be null-terminated. // NOTE: Safe to use the same variable for both input and output. BASE_EXPORT bool TrimString(const std::wstring& input, const wchar_t trim_chars[], |