Commit 9851c703 authored by Josh Haberman's avatar Josh Haberman

Rename StringPieceTrimWhitespace() for rewriting purposes.

parent 52fee0e8
......@@ -364,7 +364,7 @@ string StripProto(const string& filename) {
}
}
void StringPieceTrimWhitespace(StringPiece* input) {
void TrimWhitespace(StringPiece* input) {
while (!input->empty() && ascii_isspace(*input->data())) {
input->remove_prefix(1);
}
......@@ -1054,8 +1054,8 @@ bool ExpectedPrefixesCollector::ConsumeLine(
}
StringPiece package(line, 0, offset);
StringPiece prefix(line, offset + 1, line.length() - offset - 1);
StringPieceTrimWhitespace(&package);
StringPieceTrimWhitespace(&prefix);
TrimWhitespace(&package);
TrimWhitespace(&prefix);
// Don't really worry about error checking the package/prefix for
// being valid. Assume the file is validated when it is created/edited.
(*prefix_map_)[package.ToString()] = prefix.ToString();
......
......@@ -62,7 +62,7 @@ string PROTOC_EXPORT EscapeTrigraphs(const string& to_escape);
string PROTOC_EXPORT StripProto(const string& filename);
// Remove white space from either end of a StringPiece.
void PROTOC_EXPORT StringPieceTrimWhitespace(StringPiece* input);
void PROTOC_EXPORT TrimWhitespace(StringPiece* input);
// Returns true if the name requires a ns_returns_not_retained attribute applied
// to it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment