CBMC
Loading...
Searching...
No Matches
prefix.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module:
4
5Author: Daniel Kroening, kroening@kroening.com
6
7\*******************************************************************/
8
9
10#ifndef CPROVER_UTIL_PREFIX_H
11#define CPROVER_UTIL_PREFIX_H
12
13#include <string>
14
15// C++20 will have std::string::starts_with
16
17inline bool has_prefix(const std::string &s, const std::string &prefix)
18{
19 return s.compare(0, prefix.size(), prefix)==0;
20}
21
22#endif // CPROVER_UTIL_PREFIX_H
bool has_prefix(const std::string &s, const std::string &prefix)
Definition prefix.h:17