diff --git a/src/util/infix.h b/src/util/infix.h new file mode 100644 index 00000000000..2fcc1338d5d --- /dev/null +++ b/src/util/infix.h @@ -0,0 +1,22 @@ +/*******************************************************************\ + +Module: String infix shorthand + +Author: Chris Smowton, chris.smowton@diffblue.com + +\*******************************************************************/ + +#ifndef CPROVER_UTIL_INFIX_H +#define CPROVER_UTIL_INFIX_H + +#include + +inline bool has_infix( + const std::string &s, + const std::string &infix, + size_t offset) +{ + return s.compare(offset, infix.size(), infix)==0; +} + +#endif