1#include "StringUtils.h"
2
3
4namespace detail
5{
6
7bool startsWith(const std::string & s, const char * prefix, size_t prefix_size)
8{
9 return s.size() >= prefix_size && 0 == memcmp(s.data(), prefix, prefix_size);
10}
11
12bool endsWith(const std::string & s, const char * suffix, size_t suffix_size)
13{
14 return s.size() >= suffix_size && 0 == memcmp(s.data() + s.size() - suffix_size, suffix, suffix_size);
15}
16
17}
18