1 #ifndef TGBOT_STR_MATCH_H 2 #define TGBOT_STR_MATCH_H 16 inline bool whenStarts(
const std::string &target,
const char *what) {
17 return target.compare(0, strlen(what), what) == 0;
26 inline bool whenContains(
const std::string &target,
const char *what) {
27 return target.find(what) != std::string::npos;
33 #endif // TGBOT_STR_MATCH_H bool whenContains(const std::string &target, const char *what)
whenContains (see RegisterCallback::callback() )
Definition: str_match.h:26
Main tgbot namespace.
Definition: bot.h:13
bool whenStarts(const std::string &target, const char *what)
whenStarts (see RegisterCallback::callback() )
Definition: str_match.h:16