Fixed a lot of stuff to do with objects and method calls.

This commit is contained in:
Nathan Braswell
2014-03-08 16:13:09 -05:00
parent 51e04498d6
commit 6eee808f96
4 changed files with 17 additions and 3 deletions

View File

@@ -16,5 +16,12 @@ std::string strSlice(std::string str, int begin, int end);
int findPerenEnd(std::string str, int i);
std::vector<std::string> split(const std::string &str, char delim);
std::string join(const std::vector<std::string> &strVec, std::string joinStr);
template <typename T>
bool contains(std::vector<T> vec, T item) {
for (auto i : vec)
if (i == item)
return true;
return false;
}
#endif