From b8345246dcc2121bcb6d1515a9341789de20199f Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sun, 27 Oct 2024 09:04:05 -0500 Subject: First crack at file objects. --- include/fud_string_view.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/fud_string_view.hpp') diff --git a/include/fud_string_view.hpp b/include/fud_string_view.hpp index 718b3d7..972630a 100644 --- a/include/fud_string_view.hpp +++ b/include/fud_string_view.hpp @@ -61,6 +61,13 @@ struct StringView { explicit StringView(const String& fudString) noexcept; + template + constexpr static StringView cStringView(const char (&input)[N]) + { + static_assert(N > 0); + return StringView{N, reinterpret_cast(input)}; + } + [[nodiscard]] constexpr size_t length() const { return m_length; -- cgit v1.2.3