change as requested

This commit is contained in:
taiyang-li 2023-07-26 10:53:07 +08:00
parent 23897b823d
commit 27f3c5cfa2
4 changed files with 14 additions and 6 deletions

View File

@ -695,7 +695,7 @@ endsWith(str, suffix)
## endsWithUTF8
Returns whether string `str` ends with `suffix`, assuming that both strings contain valid UTF-8 encoded text. If this assumption is violated, no exception is thrown and the result is undefined.
Returns whether string `str` ends with `suffix`, the difference between `endsWithUTF8` and `endsWith` is that `endsWithUTF8` match `str` and `suffix` by UTF-8 characters.
**Syntax**
@ -727,7 +727,7 @@ SELECT startsWith('Spider-Man', 'Spi');
## startsWithUTF8
Returns whether string `str` starts with `prefix`, assuming that both string contains valid UTF-8 encoded text. If this assumption is violated, no exception is thrown and the result is undefined.
Returns whether string `str` starts with `prefix`, the difference between `startsWithUTF8` and `startsWith` is that `startsWithUTF8` match `str` and `suffix` by UTF-8 characters.
**Example**

View File

@ -10,7 +10,12 @@ using FunctionEndsWithUTF8 = FunctionStartsEndsWith<NameEndsWithUTF8>;
REGISTER_FUNCTION(EndsWithUTF8)
{
factory.registerFunction<FunctionEndsWithUTF8>();
factory.registerFunction<FunctionEndsWithUTF8>(FunctionDocumentation{
.description = R"(
Returns whether string `str` ends with `suffix`, the difference between `endsWithUTF8` and `endsWith` is that `endsWithUTF8` match `str` and `suffix` by UTF-8 characters.
)",
.examples{{"endsWithUTF8", "select endsWithUTF8('富强民主文明和谐', '富强');", ""}},
.categories{"String"}});
}
}

View File

@ -10,7 +10,12 @@ using FunctionStartsWithUTF8 = FunctionStartsEndsWith<NameStartsWithUTF8>;
REGISTER_FUNCTION(StartsWithUTF8)
{
factory.registerFunction<FunctionStartsWithUTF8>();
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"}});
}
}

View File

@ -263,7 +263,6 @@ encodeURLComponent
encodeURLFormComponent
encodeXMLComponent
endsWith
endsWithUTF8
equals
erf
erfc
@ -666,7 +665,6 @@ splitByString
splitByWhitespace
sqrt
startsWith
startsWithUTF8
subBitmap
substring
substringUTF8