Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-11-05 10:23:03 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-11-05 10:23:03 +1100
commit515d71409c4b65c159ac6c0e815657f3ece56cb2 (patch)
tree7099069cb2136e0df2133b3b554de7e5486da2f5 /source/core
parent6435fd5e34a613c2b143d9aba0672fead043ce13 (diff)
support for an absurd hacky trick used by FD: appending to the frame ID via the directives parameter
wtf :sob:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/StarDirectives.cpp9
-rw-r--r--source/core/StarDirectives.hpp1
2 files changed, 10 insertions, 0 deletions
diff --git a/source/core/StarDirectives.cpp b/source/core/StarDirectives.cpp
index ea18bc9..b72e8ee 100644
--- a/source/core/StarDirectives.cpp
+++ b/source/core/StarDirectives.cpp
@@ -156,6 +156,15 @@ void Directives::parse(String&& directives) {
}
}
+StringView Directives::prefix() const {
+ if (!m_shared)
+ return "";
+ else if (m_shared->empty())
+ return m_shared->string;
+ else
+ return StringView(m_shared->string).substr(0, m_shared->entries.begin()->begin);
+}
+
String Directives::string() const {
if (!m_shared)
return "";
diff --git a/source/core/StarDirectives.hpp b/source/core/StarDirectives.hpp
index 9290649..d83a3e8 100644
--- a/source/core/StarDirectives.hpp
+++ b/source/core/StarDirectives.hpp
@@ -55,6 +55,7 @@ public:
void loadOperations() const;
void parse(String&& directives);
+ StringView prefix() const;
String string() const;
String const* stringPtr() const;
String buildString() const;