首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::basic_string_view::find_last_not_of

constexpr size_type find_last_not_of(basic_string_view v, size_type pos = npos) const;

(1)

(since C++17)

constexpr size_type find_last_not_of(CharT c, size_type pos = npos) const;

(2)

(since C++17)

constexpr size_type find_last_not_of(const CharT* s, size_type pos, size_type count) const;

(3)

(since C++17)

constexpr size_type find_last_not_of(const CharT* s, size_type pos = npos) const;

(4)

(since C++17)

查找最后一个字符,该字符不等于给定字符序列中的任何字符。

1%29发现最后一个字符不等于v在这个视图中,从位置开始pos...

2%29相当于find_last_not_of(basic_string_view(&c, 1), pos)...

3%29相当于find_last_not_of(basic_string_view(s, count), pos)...

4%29相当于find_last_not_of(basic_string_view(s), pos)...

参数

v

-

view to search for

pos

-

position at which to start the search

count

-

length of the string of characters to compare

s

-

pointer to a string of characters to compare

ch

-

character to compare

返回值

最后一个字符的位置不等于给定字符串中的任何字符,或npos如果找不到这样的角色。

例外

1-2%29

noexcept规格:

noexcept

复杂性

O%28size()%2Av.size()%29最坏。

另见

find

find characters in the view (public member function)

rfind

find the last occurrence of a substring (public member function)

find_first_of

find first occurrence of characters (public member function)

find_last_of

find last occurrence of characters (public member function)

find_first_not_of

find first absence of characters (public member function)

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券