inline bool startsWith(std::string s, std::string sub) {
return s.find(sub) == 0;
}
inline bool endsWith(std::string s, std::string sub) {
if (s.length() < sub.length())
return false;
return s.rfind(sub) == (s.length() - sub.length());
}
inline std::vector<std::string> string_split(std::string str, const char delim = ' ') {
std::string token;
std::vector<std::string> res;
std::istringstream iss(str);
while (std::getline(iss, token, delim))
res.push_back(token);
return res;
}
01-05
1396
06-09
236