cprover
suffix.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module:
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
9
10
#ifndef CPROVER_UTIL_SUFFIX_H
11
#define CPROVER_UTIL_SUFFIX_H
12
13
#include <string>
14
15
inline
bool
has_suffix
(
const
std::string &s,
const
std::string &suffix)
16
{
17
if
(suffix.size()>s.size())
18
return
false
;
19
return
s.compare(s.size()-suffix.size(), std::string::npos, suffix)==0;
20
}
21
22
#endif // CPROVER_UTIL_SUFFIX_H
has_suffix
bool has_suffix(const std::string &s, const std::string &suffix)
Definition:
suffix.h:15
util
suffix.h
Generated by
1.8.12