diff options
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/string.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/string.cpp b/src/utils/string.cpp index 8a4c1cc..9727f3f 100644 --- a/src/utils/string.cpp +++ b/src/utils/string.cpp @@ -1,5 +1,6 @@ #include "string.hpp" +#include <iostream> #include <sstream> #include <string> #include <vector> @@ -23,6 +24,10 @@ namespace bot { std::string join_vector(const std::vector<std::string> &vec, char delimiter) { + if (vec.empty()) { + return ""; + } + std::string str; for (auto i = vec.begin(); i != vec.end() - 1; i++) { |
