#ifndef GENERS_FINDNAME_HH_ #define GENERS_FINDNAME_HH_ #include #include #include namespace gs { inline unsigned long findName(const std::vector& vec, const char* name) { assert(name); if (vec.empty()) return 0UL; const std::string* names = &vec[0]; const unsigned long ncols = vec.size(); unsigned long col = 0; for (; col < ncols && names[col] != name; ++col) {;} return col; } } #endif // GENERS_FINDNAME_HH_