Category : agrep

Take two character strings in C or C++, s1 and s2. It is rather trivial to check if one contains the other exactly. The following will return true in case s2 is a substring of s1. In C: strstr(s1, s2) In C++: #include <string> str.find(str2) != string::npos With boost: #include <boost/algorithm/string.hpp> boost::algorithm::contains(s1, s2) What I ..

Read more