We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5bbdd75 + b5dee9a commit 49dbc61Copy full SHA for 49dbc61
src/util/prefix.h
@@ -12,6 +12,8 @@ Author: Daniel Kroening, kroening@kroening.com
12
13
#include <string>
14
15
+// C++20 will have std::string::starts_with
16
+
17
inline bool has_prefix(const std::string &s, const std::string &prefix)
18
{
19
return s.compare(0, prefix.size(), prefix)==0;
src/util/suffix.h
+// C++20 will have std::string::ends_with
inline bool has_suffix(const std::string &s, const std::string &suffix)
if(suffix.size()>s.size())
0 commit comments