PragmaTwice commented on code in PR #644:
URL: https://github.com/apache/incubator-kvrocks/pull/644#discussion_r902440112
##########
src/util.cc:
##########
@@ -371,7 +371,14 @@ std::string Trim(std::string in, const std::string &chars)
{
std::vector<std::string> Split(const std::string &in, const std::string
&delim) {
std::vector<std::string> out;
- if (in.empty() || delim.empty()) return out;
+ if (in.empty()) {
+ return out;
+ }
+
+ if (delim.empty()) {
Review Comment:
So thanks, I'll fix it.
BTW, this function has some difference than some well known `split`: it
split strings regarding to regex "a|b|c|..." where delim="abc...", so I am
considering to add another split that split strings just regarding to the
provided delimiter.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]