ClickHouse/src/Functions/startsWithUTF8.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
692 B
C++
Raw Normal View History

#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"}});
}
}