ClickHouse/dbms/Common/StringUtils/StringUtils.cpp
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

18 lines
406 B
C++

#include "StringUtils.h"
namespace detail
{
bool startsWith(const std::string & s, const char * prefix, size_t prefix_size)
{
return s.size() >= prefix_size && 0 == memcmp(s.data(), prefix, prefix_size);
}
bool endsWith(const std::string & s, const char * suffix, size_t suffix_size)
{
return s.size() >= suffix_size && 0 == memcmp(s.data() + s.size() - suffix_size, suffix, suffix_size);
}
}