diff --git a/stringtoolbox.hpp b/stringtoolbox.hpp index dfdeb81..62a7b89 100644 --- a/stringtoolbox.hpp +++ b/stringtoolbox.hpp @@ -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 @@ -82,7 +82,7 @@ inline std::vector 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) {