diff options
Diffstat (limited to 'include/rtl/ustring.hxx')
-rw-r--r-- | include/rtl/ustring.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index e5b58be8c52d..e14549482f35 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -161,6 +161,11 @@ public: // no destructor necessary because we know we are pointing at a compile-time // constant OUStringLiteral, which bypasses ref-counting. + /** + make it easier to pass to OUStringBuffer and similar without casting/converting + */ + constexpr std::u16string_view asView() const { return {pData->buffer, static_cast<sal_uInt32>(pData->length)}; } + inline operator const OUString&() const; private: |