std::experimental::basic_string_view<CharT,Traits>:: find_first_of
From cppreference.net
<
cpp
|
experimental
|
basic string view
|
constexpr
size_type find_first_of
(
basic_string_view v, size_type pos
=
0
)
const
noexcept
;
|
(1) | (라이브러리 펀더멘털 TS) |
|
constexpr
size_type find_first_of
(
CharT c, size_type pos
=
0
)
const
noexcept
;
|
(2) | (라이브러리 펀더멘털 TS) |
|
constexpr
size_type find_first_of
(
const
CharT
*
s, size_type pos, size_type count
)
const
;
|
(3) | (라이브러리 펀더멘털 TS) |
|
constexpr
size_type find_first_of
(
const
CharT
*
s, size_type pos
=
0
)
const
;
|
(4) | (라이브러리 펀더멘털 TS) |
주어진 문자 시퀀스에 있는 문자 중 하나와 일치하는 첫 번째 문자를 찾습니다.
1)
이 뷰에서 위치
pos
부터 시작하여
v
의 문자 중 첫 번째로 나타나는 문자를 찾습니다.
2)
다음에 해당함
find_first_of
(
basic_string_view
(
&
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 | - | 검색할 문자 열을 가리키는 포인터 |
| ch | - | 검색할 문자 |
반환값
부분 문자열의 어떤 문자든 첫 번째로 나타나는 위치, 또는 npos 해당 문자가 발견되지 않을 경우.
복잡도
O(
size()
*
v.size()
) 최악의 경우.
참고 항목
|
뷰에서 문자 찾기
(public member function) |
|
|
부분 문자열의 마지막 발생 위치 찾기
(public member function) |
|
|
문자의 마지막 발생 위치 찾기
(public member function) |
|
|
문자가 처음으로 나타나지 않는 위치 찾기
(public member function) |
|
|
문자가 마지막으로 나타나지 않는 위치 찾기
(public member function) |