std::experimental::basic_string_view<CharT,Traits>::find_last_not_of
來自 cppreference.com
< cpp | experimental | basic string view
constexpr size_type find_last_not_of(basic_string_view v, size_type pos = npos) const noexcept; |
(1) | (庫基礎 TS) |
constexpr size_type find_last_not_of(CharT c, size_type pos = npos) const noexcept; |
(2) | (庫基礎 TS) |
constexpr size_type find_last_not_of(const CharT* s, size_type pos, size_type count) const; |
(3) | (庫基礎 TS) |
constexpr size_type find_last_not_of(const CharT* s, size_type pos = npos) const; |
(4) | (庫基礎 TS) |
查詢與給定字元序列中任何字元均不相等的最後一個字元。
1) 在此檢視中,從位置
pos
開始,查詢與 v
中任何字元均不相等的最後一個字元。2) 等價於 find_last_not_of(basic_string_view(&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()
)。
[編輯] 參閱
在檢視中查詢字元 (public member function) | |
查詢子串的最後一次出現 (public member function) | |
查詢字元的首次出現 (public member function) | |
查詢字元的最後一次出現 (public member function) | |
查詢字元的首次缺席 (public member function) |