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

summaryrefslogtreecommitdiff
path: root/source/core/StarDirectives.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/StarDirectives.cpp')
-rw-r--r--source/core/StarDirectives.cpp9
1 files changed, 9 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 "";