Namespaces
Variants

std::experimental::basic_string_view<CharT,Traits>:: operator=

From cppreference.net
basic_string_view & operator = ( const basic_string_view & view ) noexcept = default ;
(ライブラリファンダメンタルTS)

view のビューに置き換えます。

目次

パラメータ

ビュー - コピーするビュー

戻り値

* this

計算量

定数。

#include <iostream>
#include <experimental/string_view>
int main()
{
    std::experimental::string_view v = "Hello, world";
    v = v.substr(7);
    std::cout << v << '\n';
}

出力:

world

関連項目

basic_string_view を構築する
(公開メンバ関数)