The documentation for the strings concept contains a section on the find method.
It contains the following example:
std::string new_release{"apple released a new app!"};
new_release.find("app");
// => 0
new_release.find("!");
// => 24
I wonder if perhaps the example string could be shortened for students to more easily see that the index in the second example is correct. I had no issue with "app" having index 0, but ! having index 24 was a bit harder to spot :)
The documentation for the
strings
concept contains a section on thefind
method. It contains the following example:I wonder if perhaps the example string could be shortened for students to more easily see that the index in the second example is correct. I had no issue with
"app"
having index0
, but!
having index 24 was a bit harder to spot :)