CBMC
infix.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: String infix shorthand
4 
5 Author: Chris Smowton, chris.smowton@diffblue.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_UTIL_INFIX_H
13 #define CPROVER_UTIL_INFIX_H
14 
15 #include <string>
16 
17 inline bool has_infix(
18  const std::string &s,
19  const std::string &infix,
20  size_t offset)
21 {
22  return s.compare(offset, infix.size(), infix)==0;
23 }
24 
25 #endif
bool has_infix(const std::string &s, const std::string &infix, size_t offset)
Definition: infix.h:17