Add check for snap/flatpak Steam

This commit is contained in:
Patrick Nicolas committed 2025-11-19 14:16:15 +01:00
1 parent 9a55178b41
commit aff498bc2d
8 files changed
+232 -7

No files matched your search

+5 -5
View File
@@ -19,21 +19,21 @@
#include "strings.h"
std::vector<std::string> utils::split(const std::string & s, const std::string & sep)
std::vector<std::string> utils::split(std::string_view s, std::string_view sep)
{
std::string::size_type i = 0;
std::vector<std::string> v;
while (true)
{
std::string::size_type j = s.find_first_of(sep, i);
if (j == std::string::npos)
auto j = s.find_first_of(sep, i);
if (j == std::string_view::npos)
{
v.push_back(s.substr(i));
v.emplace_back(s.substr(i));
return v;
}
v.push_back(s.substr(i, j - i));
v.emplace_back(s.substr(i, j - i));
i = j + 1;
}
}