mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-26 03:46:49 -08:00
Add check for snap/flatpak Steam
This commit is contained in:
1 parent
9a55178b41
commit
aff498bc2d
8 files changed
+232
-7
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user