bool suffixIs(std::string const &, std::string const &);
///
-bool contains(std::string const & a, std::string const & b);
-
-///
-bool contains(std::string const & a, char b);
-
-/// This should probably we rewritten to be more general.
-class contains_functor {
-public:
- typedef std::string first_argument_type;
- typedef std::string second_argument_type;
- typedef bool result_type;
-
- bool operator()(std::string const & haystack, std::string const & needle) const {
- return contains(haystack, needle);
- }
-};
-
+template <typename B>
+bool contains(std::string const & a, B b)
+{
+ return a.find(b) != std::string::npos;
+}
///
bool containsOnly(std::string const &, std::string const &);