diff options
Diffstat (limited to 'include/rtl/stringconcat.hxx')
-rw-r--r-- | include/rtl/stringconcat.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/rtl/stringconcat.hxx b/include/rtl/stringconcat.hxx index 7bbcb1cf680f..ae2048e80233 100644 --- a/include/rtl/stringconcat.hxx +++ b/include/rtl/stringconcat.hxx @@ -15,6 +15,7 @@ #include "rtl/ustring.h" #include <cstddef> +#include <string_view> #include <utility> #include <string.h> @@ -334,6 +335,7 @@ template <class Derived, int nBufSize> struct OStringNumberBase rtl_str_toAsciiUpperCase_WithLength(buf, length); return std::move(*static_cast<Derived*>(this)); } + operator std::string_view() const { return std::string_view(buf, length); } char buf[nBufSize]; sal_Int32 length; }; @@ -402,6 +404,7 @@ template <class Derived, int nBufSize> struct OUStringNumberBase rtl_ustr_toAsciiUpperCase_WithLength(buf, length); return std::move(*static_cast<Derived*>(this)); } + operator std::u16string_view() const { return std::u16string_view(buf, length); } sal_Unicode buf[nBufSize]; sal_Int32 length; }; |