Search
In this lesson, we'll examine the different search features available in the string class.
We'll cover the following...
C++ offers the ability to search in a string in many variations. Each variation exists in various overloaded forms.
ℹ️ Search is called find
Odd enough the algorithms for search in a string starts with the name find. If the search was successful, you get the index of typestd::string::size_type
, if not, you get the constantstd::string::npos
. The first character has an index of 0.
The find ...