This question already has an answer here:
- Check if a string contains a string in C++ 12 answers
I need to check if a string is within a different string. In Python I would write it like this:
if('word' in 'this is a string of words'):
print('True')
else:
print('False')
>>True
How would I write that in c++? and what imports would I need?
Aucun commentaire:
Enregistrer un commentaire