themeze: prompt user to install theme after installing.

This commit is contained in:
ITotalJustice
2025-08-02 17:47:09 +01:00
parent 40e4616520
commit ab5c54b47a
2 changed files with 65 additions and 8 deletions

View File

@@ -44,10 +44,6 @@ struct FsPath {
return s;
}
constexpr auto starts_with(std::string_view str) const -> bool {
return !strncasecmp(s, str.data(), str.length());
}
constexpr auto empty() const {
return s[0] == '\0';
}
@@ -64,6 +60,19 @@ struct FsPath {
s[0] = '\0';
}
constexpr auto starts_with(std::string_view str) const -> bool {
return !strncasecmp(s, str.data(), str.length());
}
constexpr auto ends_with(std::string_view str) const -> bool {
const auto len = length();
if (len < str.length()) {
return false;
}
return !strncasecmp(s + len - str.length(), str.data(), str.length());
}
constexpr operator const char*() const { return s; }
constexpr operator char*() { return s; }
constexpr operator std::string() { return s; }