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

来自cppreference.com
 
 
 
 
constexpr size_type
    find_first_of( basic_string_view v, size_type pos = 0 ) const noexcept;
(1) (C++17 起)
constexpr size_type
    find_first_of( CharT ch, size_type pos = 0 ) const noexcept;
(2) (C++17 起)
constexpr size_type
    find_first_of( const CharT* s, size_type pos, size_type count ) const;
(3) (C++17 起)
constexpr size_type
    find_first_of( const CharT* s, size_type pos = 0 ) const;
(4) (C++17 起)

寻找首个等于给定字符序列中任意字符的字符。

1) 寻找 v 的任意字符在此视图中的首次出现,从位置 pos 开始。
2) 等价于 find_first_of(basic_string_view(std::addressof(c), 1), pos)
3) 等价于 find_first_of(basic_string_view(s, count), pos)
4) 等价于 find_first_of(basic_string_view(s), pos)

参数

v - 要搜索的视图
pos - 要开始搜索的位置
count - 要搜索的字符串的长度
s