[string.find] # 27 Strings library [[strings]](./#strings) ## 27.4 String classes [[string.classes]](string.classes#string.find) ### 27.4.3 Class template basic_string [[basic.string]](basic.string#string.find) #### 27.4.3.8 String operations [[string.ops]](string.ops#string.find) #### 27.4.3.8.2 Searching [string.find] [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L4360) Let *F* be one offind, rfind, find_first_of, find_last_of,find_first_not_of, and find_last_not_of[.](#1.sentence-1) - [(1.1)](#1.1) Each member function of the formconstexpr size_type *F*(const basic_string& str, size_type pos) const noexcept; has effects equivalent to:return *F*(basic_string_view(str), pos); - [(1.2)](#1.2) Each member function of the formconstexpr size_type *F*(const charT* s, size_type pos) const; has effects equivalent to:return *F*(basic_string_view(s), pos); - [(1.3)](#1.3) Each member function of the formconstexpr size_type *F*(const charT* s, size_type pos, size_type n) const; has effects equivalent to:return *F*(basic_string_view(s, n), pos); - [(1.4)](#1.4) Each member function of the formconstexpr size_type *F*(charT c, size_type pos) const noexcept; has effects equivalent to:return *F*(basic_string_view(addressof(c), 1), pos); [🔗](#lib:find,basic_string_) `template constexpr size_type find(const T& t, size_type pos = 0) const noexcept(see below); template constexpr size_type rfind(const T& t, size_type pos = npos) const noexcept(see below); template constexpr size_type find_first_of(const T& t, size_type pos = 0) const noexcept(see below); template constexpr size_type find_last_of(const T& t, size_type pos = npos) const noexcept(see below); template constexpr size_type find_first_not_of(const T& t, size_type pos = 0) const noexcept(see below); template constexpr size_type find_last_not_of(const T& t, size_type pos = npos) const noexcept(see below); ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L4429) *Constraints*: - [(2.1)](#2.1) is_convertible_v> istrue and - [(2.2)](#2.2) is_convertible_v isfalse[.](#2.sentence-1) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L4440) *Effects*: Let *G* be the name of the function[.](#3.sentence-1) Equivalent to:basic_string_view s = *this, sv = t;return s.*G*(sv, pos); [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L4449) *Remarks*: The exception specification is equivalent tois_nothrow_convertible_v>[.](#4.sentence-1)