| Index: base/strings/string_util.h
|
| diff --git a/base/strings/string_util.h b/base/strings/string_util.h
|
| index 9478a0c475c2910abdb6bd187b0601ce6cfc63d5..a573e227df96f6d83ff9febd7695a8a75c854138 100644
|
| --- a/base/strings/string_util.h
|
| +++ b/base/strings/string_util.h
|
| @@ -150,10 +150,10 @@ BASE_EXPORT extern const char kUtf8ByteOrderMark[];
|
| // 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[],
|
| + const base::StringPiece16& remove_chars,
|
| string16* output);
|
| BASE_EXPORT bool RemoveChars(const std::string& input,
|
| - const char remove_chars[],
|
| + const base::StringPiece& remove_chars,
|
| std::string* output);
|
|
|
| // Replaces characters in |replace_chars| from anywhere in |input| with
|
| @@ -162,11 +162,11 @@ BASE_EXPORT bool RemoveChars(const std::string& input,
|
| // |replace_chars| must be null-terminated.
|
| // NOTE: Safe to use the same variable for both |input| and |output|.
|
| BASE_EXPORT bool ReplaceChars(const string16& input,
|
| - const char16 replace_chars[],
|
| + const base::StringPiece16& replace_chars,
|
| const string16& replace_with,
|
| string16* output);
|
| BASE_EXPORT bool ReplaceChars(const std::string& input,
|
| - const char replace_chars[],
|
| + const base::StringPiece& replace_chars,
|
| const std::string& replace_with,
|
| std::string* output);
|
|
|
| @@ -174,10 +174,10 @@ BASE_EXPORT bool ReplaceChars(const std::string& input,
|
| // |trim_chars| must be null-terminated.
|
| // NOTE: Safe to use the same variable for both |input| and |output|.
|
| BASE_EXPORT bool TrimString(const string16& input,
|
| - const char16 trim_chars[],
|
| + const base::StringPiece16& trim_chars,
|
| string16* output);
|
| BASE_EXPORT bool TrimString(const std::string& input,
|
| - const char trim_chars[],
|
| + const base::StringPiece& trim_chars,
|
| std::string* output);
|
|
|
| // Truncates a string to the nearest UTF-8 character that will leave
|
| @@ -378,12 +378,12 @@ BASE_EXPORT base::string16 FormatBytesUnlocalized(int64 bytes);
|
| // |find_this| with |replace_with|.
|
| BASE_EXPORT void ReplaceFirstSubstringAfterOffset(
|
| base::string16* str,
|
| - base::string16::size_type start_offset,
|
| + size_t start_offset,
|
| const base::string16& find_this,
|
| const base::string16& replace_with);
|
| BASE_EXPORT void ReplaceFirstSubstringAfterOffset(
|
| std::string* str,
|
| - std::string::size_type start_offset,
|
| + size_t start_offset,
|
| const std::string& find_this,
|
| const std::string& replace_with);
|
|
|
| @@ -395,14 +395,13 @@ BASE_EXPORT void ReplaceFirstSubstringAfterOffset(
|
| // std::replace(str.begin(), str.end(), 'a', 'b');
|
| BASE_EXPORT void ReplaceSubstringsAfterOffset(
|
| base::string16* str,
|
| - base::string16::size_type start_offset,
|
| + size_t start_offset,
|
| const base::string16& find_this,
|
| const base::string16& replace_with);
|
| -BASE_EXPORT void ReplaceSubstringsAfterOffset(
|
| - std::string* str,
|
| - std::string::size_type start_offset,
|
| - const std::string& find_this,
|
| - const std::string& replace_with);
|
| +BASE_EXPORT void ReplaceSubstringsAfterOffset(std::string* str,
|
| + size_t start_offset,
|
| + const std::string& find_this,
|
| + const std::string& replace_with);
|
|
|
| // Reserves enough memory in |str| to accommodate |length_with_null| characters,
|
| // sets the size of |str| to |length_with_null - 1| characters, and returns a
|
|
|