Tag: C++ – Check if string contains a character
C++ – Check if string contains a character
In this article, we will learn about three different ways to check if a string contains a character or not. Check if a string contains a character using string::find() In C++, the string class provides different overloaded versions of function find() to search for sub-strings or characters in the string object. In one of the overloaded versions, …