How to check that s1 is the substring of s2 using sting.find() function?
hi @vanshikasharma1645
if (s2.find(s1) != string::npos)
if this evaluates to true then that means s1 is a substring of s2
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.