24 Strings library [strings]

24.3 String classes [string.classes]

24.3.2 Class template basic_­string [basic.string]

24.3.2.7 basic_­string string operations [string.ops]

24.3.2.7.4 basic_­string​::​find_­first_­of [string.find.first.of]

size_type find_first_of(basic_string_view<charT, traits> sv, size_type pos = 0) const noexcept;

Effects: Определяет xpos, если возможно, самое низкое положение , при котором выполняются оба следующих условия:

  • pos <= xpos и xpos < size();

  • traits​::​eq(at(xpos), sv.at(I)) для некоторого элемента I данных, на который ссылается sv.

Returns: xpos если функция может определить такое значение для xpos. В противном случае возвращается npos.

size_type find_first_of(const basic_string& str, size_type pos = 0) const noexcept;

Effects: Эквивалентен: return find_­first_­of(basic_­string_­view<charT, traits>(str), pos);

size_type find_first_of(const charT* s, size_type pos, size_type n) const;

Returns: find_­first_­of(basic_­string_­view<charT, traits>(s, n), pos).

size_type find_first_of(const charT* s, size_type pos = 0) const;

Requires: s указывает на массив, состоящий как минимум из traits​::​length(s) + 1 элементов charT.

Returns: find_­first_­of(basic_­string_­view<charT, traits>(s), pos).

size_type find_first_of(charT c, size_type pos = 0) const;

Returns: find_­first_­of(basic_­string(1, c), pos).