ClickHouse/src/Functions/replaceOne.cpp
Robert Schulze 494d6ca3df
Cleanup implementation of regexpReplace(All|One)
This is a pure refactoring, there are no semantic changes.

Cherry-picked from #42682.
2022-11-02 15:49:53 +00:00

26 lines
415 B
C++

#include "FunctionStringReplace.h"
#include "FunctionFactory.h"
#include "ReplaceStringImpl.h"
namespace DB
{
namespace
{
struct NameReplaceOne
{
static constexpr auto name = "replaceOne";
};
using FunctionReplaceOne = FunctionStringReplace<ReplaceStringImpl<ReplaceStringTraits::Replace::First>, NameReplaceOne>;
}
REGISTER_FUNCTION(ReplaceOne)
{
factory.registerFunction<FunctionReplaceOne>();
}
}