You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/01/31 23:36:49 UTC
[GitHub] [trafficserver] SolidWallOfCode commented on pull request #8638: Trim white spaces before and after the equal sign
SolidWallOfCode commented on pull request #8638:
URL: https://github.com/apache/trafficserver/pull/8638#issuecomment-1026320489
The original code is terrible, you should take this opportunity to fix it. Foremost, don't use `stringstream`. Why not something like
```
std::string out;
out.reserve(in.size());
size_t n = 0;
for ( char c : in ) {
if (!isspace(c)) { out << c; ++n; }
}
out.resize(n);
return out;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org