[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<charT, traits>(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<charT, traits>(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<charT, traits>(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<charT, traits>(addressof(c), 1), pos);

[ð](#lib:find,basic_string_)

`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);
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L4429)

*Constraints*: 

- [(2.1)](#2.1)

is_convertible_v<const T&, basic_string_view<charT, traits>> istrue and

- [(2.2)](#2.2)

is_convertible_v<const T&, const charT*> 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<charT, traits> 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<const T&, basic_string_view<charT, traits>>[.](#4.sentence-1)
