Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: third_party/protobuf/src/google/protobuf/stubs/strutil.h

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 inline string StripSuffixString(const string& str, const string& suffix) { 141 inline string StripSuffixString(const string& str, const string& suffix) {
142 if (HasSuffixString(str, suffix)) { 142 if (HasSuffixString(str, suffix)) {
143 return str.substr(0, str.size() - suffix.size()); 143 return str.substr(0, str.size() - suffix.size());
144 } else { 144 } else {
145 return str; 145 return str;
146 } 146 }
147 } 147 }
148 148
149 // ---------------------------------------------------------------------- 149 // ----------------------------------------------------------------------
150 // StripString 150 // ReplaceCharacters
151 // Replaces any occurrence of the character 'remove' (or the characters 151 // Replaces any occurrence of the character 'remove' (or the characters
152 // in 'remove') with the character 'replacewith'. 152 // in 'remove') with the character 'replacewith'.
153 // Good for keeping html characters or protocol characters (\t) out 153 // Good for keeping html characters or protocol characters (\t) out
154 // of places where they might cause a problem. 154 // of places where they might cause a problem.
155 // StripWhitespace 155 // StripWhitespace
156 // Removes whitespaces from both ends of the given string. 156 // Removes whitespaces from both ends of the given string.
157 // ---------------------------------------------------------------------- 157 // ----------------------------------------------------------------------
158 LIBPROTOBUF_EXPORT void ReplaceCharacters(string* s, const char* remove,
159 char replacewith);
158 LIBPROTOBUF_EXPORT void StripString(string* s, const char* remove, 160 LIBPROTOBUF_EXPORT void StripString(string* s, const char* remove,
159 char replacewith); 161 char replacewith);
160 162
161 LIBPROTOBUF_EXPORT void StripWhitespace(string* s); 163 LIBPROTOBUF_EXPORT void StripWhitespace(string* s);
162 164
163 165
164 // ---------------------------------------------------------------------- 166 // ----------------------------------------------------------------------
165 // LowerString() 167 // LowerString()
166 // UpperString() 168 // UpperString()
167 // ToUpper() 169 // ToUpper()
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 // ---------------------------------------------------------------------- 869 // ----------------------------------------------------------------------
868 // UTF8FirstLetterNumBytes() 870 // UTF8FirstLetterNumBytes()
869 // Length of the first UTF-8 character. 871 // Length of the first UTF-8 character.
870 // ---------------------------------------------------------------------- 872 // ----------------------------------------------------------------------
871 LIBPROTOBUF_EXPORT int UTF8FirstLetterNumBytes(const char* src, int len); 873 LIBPROTOBUF_EXPORT int UTF8FirstLetterNumBytes(const char* src, int len);
872 874
873 } // namespace protobuf 875 } // namespace protobuf
874 } // namespace google 876 } // namespace google
875 877
876 #endif // GOOGLE_PROTOBUF_STUBS_STRUTIL_H__ 878 #endif // GOOGLE_PROTOBUF_STUBS_STRUTIL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698