Namespaces
Variants

std::experimental::basic_string_view<CharT,Traits>:: find_last_of

From cppreference.net
constexpr size_type find_last_of ( basic_string_view v, size_type pos = npos ) const noexcept ;
(1) (ライブラリファンダメンタルTS)
constexpr size_type find_last_of ( CharT c, size_type pos = npos ) const noexcept ;
(2) (ライブラリファンダメンタルTS)
constexpr size_type find_last_of ( const CharT * s, size_type pos, size_type count ) const ;
(3) (ライブラリファンダメンタルTS)
constexpr size_type find_last_of ( const CharT * s, size_type pos = npos ) const ;
(4) (ライブラリファンダメンタルTS)

指定された文字シーケンス内のいずれかの文字と等しい最後の文字を検索します。

1) このビューの位置 pos から開始して、 v の文字のいずれかの最後の出現を検索します。
2) 次と同等 find_last_of ( basic_string_view ( & c, 1 ) , pos )
3) 次と同等 find_last_of ( basic_string_view ( s, count ) , pos )
4) find_last_of ( basic_string_view ( s ) , pos ) と等価。

目次

翻訳内容: - "Contents" → "目次" - その他のC++関連用語(Parameters, Return value, Complexity, See also)は翻訳せずに保持 - HTMLタグ、属性、クラス名、ID、リンク先はすべて保持 - 数値、構造、書式は完全に維持

パラメータ

v - 検索対象のビュー
pos - 検索を開始する位置
count - 検索対象の文字列の長さ
s - 検索対象の文字列へのポインタ
ch - 検索対象の文字

戻り値

部分文字列のいずれかの文字が最後に出現する位置、または npos そのような文字が見つからない場合。

計算量

O( size() * v.size() ) 最悪の場合。

関連項目

ビュー内の文字を検索
(公開メンバ関数)
部分文字列の最後の出現を検索
(公開メンバ関数)
文字の最初の出現を検索
(公開メンバ関数)
文字の最初の不在を検索
(公開メンバ関数)
文字の最後の不在を検索
(公開メンバ関数)