aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Functions/startsWithUTF8.cpp
blob: 3f46916d7607d277d37722fd45034087ab6f582f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <DataTypes/DataTypeString.h>
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionStartsEndsWith.h>


namespace DB
{

using FunctionStartsWithUTF8 = FunctionStartsEndsWith<NameStartsWithUTF8>;

REGISTER_FUNCTION(StartsWithUTF8)
{
    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"}});
}

}