Mercurial > minori
diff src/core/strings.cc @ 250:c130f47f6f48
*: many many changes
e.g. the search page is actually implemented now!
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 04 Feb 2024 21:17:17 -0500 |
parents | 69f4768a820c |
children | 862d0d8619f6 |
line wrap: on
line diff
--- a/src/core/strings.cc Wed Jan 24 20:18:59 2024 -0500 +++ b/src/core/strings.cc Sun Feb 04 21:17:17 2024 -0500 @@ -23,7 +23,7 @@ /* ew */ std::string Implode(const std::vector<std::string>& vector, const std::string& delimiter) { if (vector.size() < 1) - return "-"; + return ""; std::string out; @@ -38,7 +38,7 @@ std::string Implode(const std::set<std::string>& set, const std::string& delimiter) { if (set.size() < 1) - return "-"; + return ""; std::string out; @@ -52,6 +52,9 @@ } std::vector<std::string> Split(const std::string &text, const std::string& delimiter) { + if (text.length() < 1) + return {}; + std::vector<std::string> tokens; std::size_t start = 0, end = 0; @@ -91,7 +94,8 @@ } /* removes dumb HTML tags because anilist is aids and - gives us HTML for synopses :/ */ + * gives us HTML for synopses :/ +*/ std::string RemoveHtmlTags(std::string string) { while (string.find("<") != std::string::npos) { auto startpos = string.find("<");