phrocker commented on a change in pull request #596: MINIFICPP-925 - Fix
TailFile hang on long lines
URL: https://github.com/apache/nifi-minifi-cpp/pull/596#discussion_r296877643
##########
File path: libminifi/include/utils/StringUtils.h
##########
@@ -108,108 +101,19 @@ class StringUtils {
}
}
- static std::vector<std::string> split(const std::string &str, const
std::string &delimiter) {
- std::vector<std::string> result;
- auto curr = str.begin();
- auto end = str.end();
- auto is_func = [delimiter](int s) {
- return delimiter.at(0) == s;
- };
- while (curr != end) {
- curr = std::find_if_not(curr, end, is_func);
- if (curr == end) {
- break;
- }
- auto next = std::find_if(curr, end, is_func);
- result.push_back(std::string(curr, next));
- curr = next;
- }
-
- return result;
- }
+ static std::vector<std::string> split(const std::string &str, const
std::string &delimiter);
Review comment:
Going back through this I love some of these changes and would prefer they
be split into 3 PRs so that we can isolate their risk to separate commits and
deal with their priority independently if you don't disagree.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services