std::basic_string_view<CharT,Traits>::operator=
cppreference.com
<tbody>
</tbody>
constexpr basic_string_view& operator=( const basic_string_view& view ) noexcept = default; |
( C++17) | |
view.
Parameters
| view |
Return value
*this
Complexity
.
#include <iostream>
#include <string_view>
int main()
{
std::string_view v = "Hello, world";
v = v.substr(7);
std::cout << v << '\n';
}
:
world
(C++17) |
basic_string_view (public -) |