/** * Boilerplate and all-around utilities that need to be re-made for * C++ projects... Pretty much public domain, and "grabbed from the * web". */ #ifndef UTILS_HPP_ #define UTILS_HPP_ #include #include #include /** Splits a string by a delimiting character. */ std::vector split(const std::string &s, char delim); /** Splits a string, using a delimiter, directly into integers. */ std::vector splitToInts(std::string s, char delim); /** Splits a string, using a delimiter, directly into indices. */ std::vector splitToSizes(std::string s, char delim); #endif