October 2011
Beginner to intermediate
1200 pages
35h 33m
English
find_first_not_of() FamilyThe find_first_not_of() methods have these prototypes:
size_type find_first_not_of(const basic_string& str, size_type pos = 0) const noexcept;size_type find_first_not_of(const charT* s, size_type pos, size_type n) const;size_type find_first_not_of(const charT* s, size_type pos = 0) const;size_type find_first_not_of(charT c, size_type pos = 0) const noexcept;
These methods work like the corresponding find_first_of() methods, except that they search for the first occurrence of any character not in the substring.
Here’s code for finding the location of the first two occurrences of any of the letters not in "This" in a longer string:
string longer("That is a funny ...
Read now
Unlock full access