Skip to content

Commit 47ee5b0

Browse files
authored
Integrating @olbender's suggestion
1 parent 7d5cf53 commit 47ee5b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stringtoolbox.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2018 Christian Berger
4+
* Copyright (c) 2018-2020 Christian Berger
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -82,7 +82,7 @@ inline std::vector<std::string> split(const std::string &str,
8282
retVal.emplace_back("");
8383
}
8484
}
85-
if ((prev > 0) && (prev < str.size())) {
85+
if (prev < str.size()) {
8686
retVal.emplace_back(str.substr(prev, str.size() - prev));
8787
}
8888
else if (prev > 0) {

0 commit comments

Comments
 (0)