| Index: third_party/protobuf/src/google/protobuf/stubs/strutil.cc
|
| diff --git a/third_party/protobuf/src/google/protobuf/stubs/strutil.cc b/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
|
| index 7ba92e8f1fa4d95dd77feb4a14abe6aa1326c1b7..4fa8e99f4f25c28622ae82b3c7da1eea60df6ff2 100644
|
| --- a/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
|
| +++ b/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
|
| @@ -93,6 +93,21 @@ void StripString(string* s, const char* remove, char replacewith) {
|
| }
|
| }
|
|
|
| +// ----------------------------------------------------------------------
|
| +// ReplaceCharacters
|
| +// Replaces any occurrence of the character 'remove' (or the characters
|
| +// in 'remove') with the character 'replacewith'.
|
| +// ----------------------------------------------------------------------
|
| +void ReplaceCharacters(string *s, const char *remove, char replacewith) {
|
| + const char *str_start = s->c_str();
|
| + const char *str = str_start;
|
| + for (str = strpbrk(str, remove);
|
| + str != NULL;
|
| + str = strpbrk(str + 1, remove)) {
|
| + (*s)[str - str_start] = replacewith;
|
| + }
|
| +}
|
| +
|
| void StripWhitespace(string* str) {
|
| int str_length = str->length();
|
|
|
|
|