[string.find] (original) (raw)

27 Strings library [strings]

27.4 String classes [string.classes]

27.4.3 Class template basic_string [basic.string]

27.4.3.8 String operations [string.ops]

27.4.3.8.2 Searching [string.find]

Let F be one offind, rfind, find_first_of, find_last_of,find_first_not_of, and find_last_not_of.

template<class T> constexpr size_type find(const T& t, size_type pos = 0) const noexcept(_see below_);template<class T> constexpr size_type rfind(const T& t, size_type pos = npos) const noexcept(_see below_);template<class T> constexpr size_type find_first_of(const T& t, size_type pos = 0) const noexcept(_see below_);template<class T> constexpr size_type find_last_of(const T& t, size_type pos = npos) const noexcept(_see below_);template<class T> constexpr size_type find_first_not_of(const T& t, size_type pos = 0) const noexcept(_see below_);template<class T> constexpr size_type find_last_not_of(const T& t, size_type pos = npos) const noexcept(_see below_);

Constraints:

Effects: Let G be the name of the function.

Equivalent to:basic_string_view<charT, traits> s = *this, sv = t;return s.G(sv, pos);

Remarks: The exception specification is equivalent tois_nothrow_convertible_v<const T&, basic_string_view<charT, traits>>.