Changeset 45a95cee4988…
Parent d161796fd1a9…
by
Changes to one file · Browse files at 45a95cee4988 Showing diff from parent d161796fd1a9 Diff from another changeset...
@@ -29,4 +29,15 @@ void Tokenize(const std::string& str, std::vector<std::string>& tokens,
const std::string& delimiters = " ");
+template <typename C, typename T>
+bool contains(const C& c, const T& t)
+{
+ for (C::const_iterator i = c.begin(); i != c.end(); ++i)
+ {
+ if (*i == t)
+ return true;
+ }
+ return false;
+}
+
#endif
|
Loading...