2023-07-25 07:34:38 +00:00
|
|
|
#include <DataTypes/DataTypeString.h>
|
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/FunctionStartsEndsWith.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
using FunctionStartsWithUTF8 = FunctionStartsEndsWith<NameStartsWithUTF8>;
|
|
|
|
|
|
|
|
REGISTER_FUNCTION(StartsWithUTF8)
|
|
|
|
{
|
2023-07-26 02:53:07 +00:00
|
|
|
factory.registerFunction<FunctionStartsWithUTF8>(FunctionDocumentation{
|
|
|
|
.description = R"(
|
|
|
|
Returns whether string `str` starts with `prefix`, the difference between `startsWithUTF8` and `startsWith` is that `startsWithUTF8` match `str` and `suffix` by UTF-8 characters.
|
|
|
|
)",
|
|
|
|
.examples{{"startsWithUTF8", "select startsWithUTF8('富强民主文明和谐', '富强');", ""}},
|
|
|
|
.categories{"String"}});
|
2023-07-25 07:34:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|