Check out example codes for "check if char in string c++". It will help you in understanding the concepts better.

Code Example 1

std::string s = "hell[o";
if (s.find('[') != std::string::npos)
    ; // found
else
    ; //

Learn ReactJs, React Native from akashmittal.com