diff --git a/deps/ox/src/ox/std/strops.hpp b/deps/ox/src/ox/std/strops.hpp index 33f2d68f..68407c76 100644 --- a/deps/ox/src/ox/std/strops.hpp +++ b/deps/ox/src/ox/std/strops.hpp @@ -20,7 +20,7 @@ namespace ox { template [[nodiscard]] -constexpr Str substr(Str const&str, std::size_t pos) noexcept { +constexpr ox::StringView substr(Str const&str, std::size_t pos) noexcept { if (str.len() >= pos) { return Str(str.data() + pos, str.len() - pos); } @@ -29,7 +29,7 @@ constexpr Str substr(Str const&str, std::size_t pos) noexcept { template [[nodiscard]] -constexpr Str substr(Str const&str, std::size_t start, std::size_t end) noexcept { +constexpr ox::StringView substr(Str const&str, std::size_t start, std::size_t end) noexcept { if (str.len() >= start && end >= start) { return Str(str.data() + start, end - start); } diff --git a/deps/ox/src/ox/std/typetraits.hpp b/deps/ox/src/ox/std/typetraits.hpp index ec0f33e5..fbc92709 100644 --- a/deps/ox/src/ox/std/typetraits.hpp +++ b/deps/ox/src/ox/std/typetraits.hpp @@ -273,6 +273,7 @@ template class BasicString; template class BString; +class CStringView; class StringLiteral; class StringView; @@ -292,6 +293,10 @@ constexpr auto isOxString(const BString*) noexcept { return true; } +constexpr auto isOxString(const CStringView*) noexcept { + return true; +} + constexpr auto isOxString(const StringLiteral*) noexcept { return true; }