名前空間
変種
操作

std::basic_string_view<CharT,Traits>::substr

提供: cppreference.com
 
 
 
 
constexpr basic_string_view
    substr(size_type pos = 0, size_type count = npos ) const;
(C++17以上)

部分文字列 [pos, pos + rcount) のビューを返します。 ただし rcountcountsize() - pos の小さい方です。

目次

[編集] 引数

pos - 最初の文字の位置
count - 要求される長さ

[編集] 戻り値

部分文字列 [pos, pos + rcount) のビュー。

[編集] 例外

pos > size() の場合、 std::out_of_range

[編集] 計算量

一定。

[編集] 関連項目

文字をコピーします
(パブリックメンバ関数) [edit]
ビュー内の文字を探します
(パブリックメンバ関数) [edit]