Skip to content

Commit

Permalink
Integrating @olbender's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
chrberger authored May 27, 2020
1 parent 7d5cf53 commit 47ee5b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stringtoolbox.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2018 Christian Berger
* Copyright (c) 2018-2020 Christian Berger
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -82,7 +82,7 @@ inline std::vector<std::string> split(const std::string &str,
retVal.emplace_back("");
}
}
if ((prev > 0) && (prev < str.size())) {
if (prev < str.size()) {
retVal.emplace_back(str.substr(prev, str.size() - prev));
}
else if (prev > 0) {
Expand Down

0 comments on commit 47ee5b0

Please sign in to comment.