#pragma once #include #include #include namespace jvalidate::detail { class URI { private: std::string content_; public: URI() = default; explicit URI(std::string_view content) : content_(content) { if (content_.back() == '#') { content_.pop_back(); } } explicit operator std::string const &() const { return content_; } bool empty() const { return content_.empty(); } friend std::ostream & operator<<(std::ostream & os, URI const & self) { return os << self.content_; } auto operator<=>(URI const & lhs) const = default; }; }