名前空間
変種
操作

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

提供: cppreference.com
 
 
 
 
constexpr size_type
    find_last_not_of(basic_string_view v, size_type pos = npos) const noexcept;
(1) (C++17以上)
constexpr size_type
    find_last_not_of(CharT c, size_type pos = npos) const noexcept;
(2) (C++17以上)
constexpr size_type
    find_last_not_of(const CharT* s, size_type pos, size_type count) const;
(3) (C++17以上)
constexpr size_type
    find_last_not_of(const CharT* s, size_type pos = npos) const;
(4) (C++17以上)

指定された文字シーケンス内のいずれの文字とも等しくない最後の文字を探します。

1) v 内のいずれの文字とも等しくないこのビュー内の最後の文字を探します。 検索は位置 pos から開始されます。
2) find_last_not_of(basic_string_view(std::addressof(c), 1), pos) と同等です。
3) find_last_not_of(basic_string_view(s, count), pos) と同等です。
4) find_last_not_of(basic_string_view(s), pos) と同等です。

目次

[編集] 引数

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

[編集] 戻り値

指定された文字列内のいずれの文字とも等しくない最後の文字の位置、またはそのような文字が見つからなければ npos

[編集] 計算量

最悪で O(size() * v.size())。

[編集] 関連項目

ビュー内の文字を探します
(パブリックメンバ関数) [edit]
部分文字列が現れる最後の位置を探します
(パブリックメンバ関数) [edit]
文字が現れる最初の位置を探します
(パブリックメンバ関数) [edit]
文字が現れる最後の位置を探します
(パブリックメンバ関数) [edit]
文字が現れない最初の位置を探します
(パブリックメンバ関数) [edit]