asked 148k views
1 vote
How to use the string find() in C++

1 Answer

3 votes

Answer:

size_t find(const std::string& my_string, size_t pos = 0);

Step-by-step explanation:

We must invoke this on a string object, using another string as an argument.

The find() method will then check if the given string lies in our string. It will return the size of the sub-string including the '\0' terminating character (as size_t). But if the string does not lie in our original string, it will return 0.

answered
User Karelv
by
7.7k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.