diff --git a/source/strings.tex b/source/strings.tex index 0245aaae2a..e481e59ca5 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -678,6 +678,8 @@ constexpr basic_string_view substr(size_type pos = 0, size_type n = npos) const; // freestanding-deleted + constexpr basic_string_view subview(size_type pos = 0, + size_type n = npos) const; // freestanding-deleted constexpr int compare(basic_string_view s) const noexcept; constexpr int compare(size_type pos1, size_type n1, @@ -1200,8 +1202,10 @@ \end{itemdescr} \indexlibrarymember{substr}{basic_string_view}% +\indexlibrarymember{subview}{basic_string_view}% \begin{itemdecl} constexpr basic_string_view substr(size_type pos = 0, size_type n = npos) const; +constexpr basic_string_view subview(size_type pos = 0, size_type n = npos) const; \end{itemdecl} \begin{itemdescr} @@ -2285,6 +2289,8 @@ constexpr basic_string substr(size_type pos = 0, size_type n = npos) const &; constexpr basic_string substr(size_type pos = 0, size_type n = npos) &&; + constexpr basic_string_view subview(size_type pos = 0, + size_type n = npos) const; template constexpr int compare(const T& t) const noexcept(@\seebelow@); @@ -4470,6 +4476,17 @@ Equivalent to: \tcode{return basic_string(std::move(*this), pos, n);} \end{itemdescr} +\indexlibrarymember{subview}{basic_string}% +\begin{itemdecl} +constexpr basic_string_view subview(size_type pos = 0, size_type n = npos) const; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Equivalent to: \tcode{return basic_string_view(*this).subview(pos, n);} +\end{itemdescr} + \rSec4[string.compare]{\tcode{basic_string::compare}} \indexlibrarymember{compare}{basic_string}% diff --git a/source/support.tex b/source/support.tex index 7d53612aad..acfe0e10e9 100644 --- a/source/support.tex +++ b/source/support.tex @@ -821,6 +821,7 @@ #define @\defnlibxname{cpp_lib_stdatomic_h}@ 202011L // also in \libheader{stdatomic.h} #define @\defnlibxname{cpp_lib_string_contains}@ 202011L // also in \libheader{string}, \libheader{string_view} #define @\defnlibxname{cpp_lib_string_resize_and_overwrite}@ 202110L // also in \libheader{string} +#define @\defnlibxname{cpp_lib_string_subview}@ 202506L // also in \libheader{string}, \libheader{string_view} #define @\defnlibxname{cpp_lib_string_udls}@ 201304L // also in \libheader{string} #define @\defnlibxname{cpp_lib_string_view}@ 202403L // also in \libheader{string}, \libheader{string_view} #define @\defnlibxname{cpp_lib_submdspan}@ 202411L // freestanding, also in \libheader{mdspan}