mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 12:22:12 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
18 lines
406 B
C++
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);
|
|
}
|
|
|
|
}
|