This is an automated email from the ASF dual-hosted git repository. kassiez pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push: new 6d51f245b91 [doc] add trim_in function docs (#1207) 6d51f245b91 is described below commit 6d51f245b910bb485f2e5ad8bbdc24ec5eb18766 Author: Jiwen liu <61498169+liujiwen...@users.noreply.github.com> AuthorDate: Thu Nov 28 18:13:56 2024 +0800 [doc] add trim_in function docs (#1207) https://github.com/apache/doris/pull/41681 # Versions - [x] dev - [x] 3.0 - [x] 2.1 - [ ] 2.0 # Languages - [x] Chinese - [x] English --------- Co-authored-by: KassieZ <139741991+kass...@users.noreply.github.com> --- .../sql-functions/string-functions/ltrim_in.md | 57 +++++++++++++++++++++ .../sql-functions/string-functions/rtrim_in.md | 59 ++++++++++++++++++++++ .../sql-functions/string-functions/trim_in.md | 58 +++++++++++++++++++++ .../sql-functions/string-functions/ltrim_in.md | 57 +++++++++++++++++++++ .../sql-functions/string-functions/rtrim_in.md | 56 ++++++++++++++++++++ .../sql-functions/string-functions/trim_in.md | 58 +++++++++++++++++++++ .../sql-functions/string-functions/ltrim_in.md | 57 +++++++++++++++++++++ .../sql-functions/string-functions/rtrim_in.md | 55 ++++++++++++++++++++ .../sql-functions/string-functions/trim_in.md | 58 +++++++++++++++++++++ .../sql-functions/string-functions/ltrim_in.md | 56 ++++++++++++++++++++ .../sql-functions/string-functions/rtrim_in.md | 56 ++++++++++++++++++++ .../sql-functions/string-functions/trim_in.md | 58 +++++++++++++++++++++ sidebars.json | 3 ++ .../sql-functions/string-functions/ltrim_in.md | 56 ++++++++++++++++++++ .../sql-functions/string-functions/rtrim_in.md | 59 ++++++++++++++++++++++ .../sql-functions/string-functions/trim_in.md | 56 ++++++++++++++++++++ .../sql-functions/string-functions/ltrim_in.md | 57 +++++++++++++++++++++ .../sql-functions/string-functions/rtrim_in.md | 59 ++++++++++++++++++++++ .../sql-functions/string-functions/trim_in.md | 57 +++++++++++++++++++++ versioned_sidebars/version-2.1-sidebars.json | 3 ++ versioned_sidebars/version-3.0-sidebars.json | 3 ++ 21 files changed, 1038 insertions(+) diff --git a/docs/sql-manual/sql-functions/string-functions/ltrim_in.md b/docs/sql-manual/sql-functions/string-functions/ltrim_in.md new file mode 100644 index 00000000000..9222fdb3ec8 --- /dev/null +++ b/docs/sql-manual/sql-functions/string-functions/ltrim_in.md @@ -0,0 +1,57 @@ +--- +{ + "title": "LTRIM_IN", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## Description + + +## Syntax + +`VARCHAR ltrim_in(VARCHAR str[, VARCHAR rhs])` + +When there is no rhs parameter, remove the spaces that appear consecutively in the parameter str starting from the left part; when there is an rhs parameter, search and remove any characters in the rhs character set at the left end of the string (regardless of order) + +## Examples + +```sql +mysql> SELECT ltrim_in(' ab d') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT ltrim_in('ababccaab','ab') str; ++-------+ +| str | ++-------+ +| ccaab | ++-------+ +``` + +## Keywords + +LTRIM_IN diff --git a/docs/sql-manual/sql-functions/string-functions/rtrim_in.md b/docs/sql-manual/sql-functions/string-functions/rtrim_in.md new file mode 100644 index 00000000000..aa8612bddaf --- /dev/null +++ b/docs/sql-manual/sql-functions/string-functions/rtrim_in.md @@ -0,0 +1,59 @@ +--- +{ + "title": "RTRIM_IN", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## Description + + +## Syntax + +`VARCHAR rtrim_in(VARCHAR str[, VARCHAR rhs])` + +When there is no rhs parameter, remove the spaces that appear consecutively in the parameter str starting from the right part; when there is an rhs parameter, search and remove any characters in the rhs character set at the right end of the string (regardless of order) + + + +## Example + +```sql +mysql> SELECT rtrim_in('ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT rtrim_in('ababccaab','ab') str; ++--------+ +| str | ++--------+ +| ababcc | ++--------+ +``` + +## Keywords + +RTRIM_IN diff --git a/docs/sql-manual/sql-functions/string-functions/trim_in.md b/docs/sql-manual/sql-functions/string-functions/trim_in.md new file mode 100644 index 00000000000..c09759b585d --- /dev/null +++ b/docs/sql-manual/sql-functions/string-functions/trim_in.md @@ -0,0 +1,58 @@ +--- +{ + "title": "TRIM_IN", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## Description + + +## Syntax + +`VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])` + +When there is no rhs parameter, remove the spaces that appear consecutively at the right and left beginning of the parameter str; when there is an rhs parameter, search and remove any characters in the rhs character set at both ends of the string (regardless of order) + + +## Examples + +```sql +mysql> SELECT trim_in(' ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT trim_in('ababccaab','ab') str; ++------+ +| str | ++------+ +| cc | ++------+ +``` + +## Keywords + +TRIM_IN diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/ltrim_in.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/ltrim_in.md new file mode 100644 index 00000000000..181577b8d82 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/ltrim_in.md @@ -0,0 +1,57 @@ +--- +{ + "title": "LTRIM_IN", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## 描述 + +## 语法 + +`VARCHAR ltrim_in(VARCHAR str[, VARCHAR rhs])` + + +当没有 `rhs` 参数时,将参数 `str` 中从左侧部分开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的左端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) + +## 举例 + +```sql +mysql> SELECT ltrim_in(' ab d') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT ltrim_in('ababccaab','ab') str; ++-------+ +| str | ++-------+ +| ccaab | ++-------+ +``` + +## 关键词 + +LTRIM_IN diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/rtrim_in.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/rtrim_in.md new file mode 100644 index 00000000000..f1f3dba3c06 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/rtrim_in.md @@ -0,0 +1,56 @@ +--- +{ + "title": "RTRIM_IN", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## 描述 + +## 语法 + +`VARCHAR rtrim_in(VARCHAR str[, VARCHAR rhs])` + +当没有 `rhs` 参数时,将参数 `str` 中从右侧部分开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的右端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) + +## 举例 + +```sql +mysql> SELECT rtrim_in('ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT rtrim_in('ababccaab','ab') str; ++---------+ +| str | ++---------+ +| ababcc | ++---------+ +``` + +## 关键词 + +RTRIM_IN diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/trim_in.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/trim_in.md new file mode 100644 index 00000000000..44fcc14ff9f --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/trim_in.md @@ -0,0 +1,58 @@ +--- +{ + "title": "TRIM_IN", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## 描述 + +## 语法 + +`VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])` + + +当没有 `rhs` 参数时,将参数 `str` 中右侧和左侧开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的两端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) + + +## 举例 + +```sql +mysql> SELECT trim_in(' ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT trim_in('ababccaab','ab') str; ++------+ +| str | ++------+ +| cc | ++------+ +``` + +## 关键词 + +TRIM_IN diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/string-functions/ltrim_in.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/string-functions/ltrim_in.md new file mode 100644 index 00000000000..181577b8d82 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/string-functions/ltrim_in.md @@ -0,0 +1,57 @@ +--- +{ + "title": "LTRIM_IN", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## 描述 + +## 语法 + +`VARCHAR ltrim_in(VARCHAR str[, VARCHAR rhs])` + + +当没有 `rhs` 参数时,将参数 `str` 中从左侧部分开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的左端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) + +## 举例 + +```sql +mysql> SELECT ltrim_in(' ab d') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT ltrim_in('ababccaab','ab') str; ++-------+ +| str | ++-------+ +| ccaab | ++-------+ +``` + +## 关键词 + +LTRIM_IN diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/string-functions/rtrim_in.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/string-functions/rtrim_in.md new file mode 100644 index 00000000000..14f8647b608 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/string-functions/rtrim_in.md @@ -0,0 +1,55 @@ +--- +{ + "title": "RTRIM_IN", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## 描述 + +## 语法 + +`VARCHAR rtrim_in(VARCHAR str[, VARCHAR rhs])` + +当没有 `rhs` 参数时,将参数 `str` 中从右侧部分开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的右端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) + +## 举例 + +```sql +mysql> SELECT rtrim_in('ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT rtrim_in('ababccaab','ab') str; ++---------+ +| str | ++---------+ +| ababcc | ++---------+ +``` + +## 关键词 + +RTRIM_IN diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/string-functions/trim_in.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/string-functions/trim_in.md new file mode 100644 index 00000000000..44fcc14ff9f --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/string-functions/trim_in.md @@ -0,0 +1,58 @@ +--- +{ + "title": "TRIM_IN", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## 描述 + +## 语法 + +`VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])` + + +当没有 `rhs` 参数时,将参数 `str` 中右侧和左侧开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的两端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) + + +## 举例 + +```sql +mysql> SELECT trim_in(' ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT trim_in('ababccaab','ab') str; ++------+ +| str | ++------+ +| cc | ++------+ +``` + +## 关键词 + +TRIM_IN diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/string-functions/ltrim_in.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/string-functions/ltrim_in.md new file mode 100644 index 00000000000..20931493b79 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/string-functions/ltrim_in.md @@ -0,0 +1,56 @@ +--- +{ + "title": "LTRIM_IN", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## 描述 + +## 语法 + +`VARCHAR ltrim_in(VARCHAR str[, VARCHAR rhs])` + + +当没有 `rhs` 参数时,将参数 `str` 中从左侧部分开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的左端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) + +## 举例 + +```sql +mysql> SELECT ltrim_in(' ab d') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT ltrim_in('ababccaab','ab') str; ++-------+ +| str | ++-------+ +| ccaab | ++-------+ +``` + +## 关键词 + +LTRIM_IN diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/string-functions/rtrim_in.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/string-functions/rtrim_in.md new file mode 100644 index 00000000000..f1f3dba3c06 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/string-functions/rtrim_in.md @@ -0,0 +1,56 @@ +--- +{ + "title": "RTRIM_IN", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## 描述 + +## 语法 + +`VARCHAR rtrim_in(VARCHAR str[, VARCHAR rhs])` + +当没有 `rhs` 参数时,将参数 `str` 中从右侧部分开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的右端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) + +## 举例 + +```sql +mysql> SELECT rtrim_in('ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT rtrim_in('ababccaab','ab') str; ++---------+ +| str | ++---------+ +| ababcc | ++---------+ +``` + +## 关键词 + +RTRIM_IN diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/string-functions/trim_in.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/string-functions/trim_in.md new file mode 100644 index 00000000000..44fcc14ff9f --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/string-functions/trim_in.md @@ -0,0 +1,58 @@ +--- +{ + "title": "TRIM_IN", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## 描述 + +## 语法 + +`VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])` + + +当没有 `rhs` 参数时,将参数 `str` 中右侧和左侧开始部分连续出现的空格去掉;当有 `rhs` 参数时,在字符串的两端查找并移除 `rhs` 字符集合中的任何字符(不考虑顺序) + + +## 举例 + +```sql +mysql> SELECT trim_in(' ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT trim_in('ababccaab','ab') str; ++------+ +| str | ++------+ +| cc | ++------+ +``` + +## 关键词 + +TRIM_IN diff --git a/sidebars.json b/sidebars.json index 2ad74b64eb9..21e234a65cf 100644 --- a/sidebars.json +++ b/sidebars.json @@ -936,6 +936,9 @@ "sql-manual/sql-functions/string-functions/trim", "sql-manual/sql-functions/string-functions/ltrim", "sql-manual/sql-functions/string-functions/rtrim", + "sql-manual/sql-functions/string-functions/trim_in", + "sql-manual/sql-functions/string-functions/ltrim_in", + "sql-manual/sql-functions/string-functions/rtrim_in", "sql-manual/sql-functions/string-functions/null-or-empty", "sql-manual/sql-functions/string-functions/not-null-or-empty", "sql-manual/sql-functions/string-functions/hex", diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/string-functions/ltrim_in.md b/versioned_docs/version-2.1/sql-manual/sql-functions/string-functions/ltrim_in.md new file mode 100644 index 00000000000..6336f9ed5e5 --- /dev/null +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/string-functions/ltrim_in.md @@ -0,0 +1,56 @@ +--- +{ + "title": "LTRIM_IN", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## Description + + +## Syntax + +`VARCHAR ltrim_in(VARCHAR str[, VARCHAR rhs])` + +When there is no rhs parameter, remove the spaces that appear consecutively in the parameter str starting from the left part; when there is an rhs parameter, search and remove any characters in the rhs character set at the left end of the string (regardless of order) + +## Examples + +```sql +mysql> SELECT ltrim_in(' ab d') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT ltrim_in('ababccaab','ab') str; ++-------+ +| str | ++-------+ +| ccaab | ++-------+ +``` + +## Keywords + +LTRIM_IN diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/string-functions/rtrim_in.md b/versioned_docs/version-2.1/sql-manual/sql-functions/string-functions/rtrim_in.md new file mode 100644 index 00000000000..dafc09c6e90 --- /dev/null +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/string-functions/rtrim_in.md @@ -0,0 +1,59 @@ +--- +{ + "title": "RTRIM_IN", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## Description + + +## Syntax + +`VARCHAR rtrim_in(VARCHAR str[, VARCHAR rhs])` + +When there is no rhs parameter, remove the spaces that appear consecutively in the parameter str starting from the right part; when there is an rhs parameter, search and remove any characters in the rhs character set at the right end of the string (regardless of order) + + + +## Examples + +```sql +mysql> SELECT rtrim_in('ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT rtrim_in('ababccaab','ab') str; ++--------+ +| str | ++--------+ +| ababcc | ++--------+ +``` + +## Keywords + +RTRIM_IN diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/string-functions/trim_in.md b/versioned_docs/version-2.1/sql-manual/sql-functions/string-functions/trim_in.md new file mode 100644 index 00000000000..d9c9e141126 --- /dev/null +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/string-functions/trim_in.md @@ -0,0 +1,56 @@ +--- +{ + "title": "TRIM_IN", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## Description + + +## Syntax + +`VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])` + +When there is no rhs parameter, remove the spaces that appear consecutively at the right and left beginning of the parameter str; when there is an rhs parameter, search and remove any characters in the rhs character set at both ends of the string (regardless of order) + +## Examples + +```sql +mysql> SELECT trim_in(' ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT trim_in('ababccaab','ab') str; ++------+ +| str | ++------+ +| cc | ++------+ +``` + +## Keywords + +TRIM_IN diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/string-functions/ltrim_in.md b/versioned_docs/version-3.0/sql-manual/sql-functions/string-functions/ltrim_in.md new file mode 100644 index 00000000000..d99044c4be0 --- /dev/null +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/string-functions/ltrim_in.md @@ -0,0 +1,57 @@ +--- +{ + "title": "LTRIM_IN", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## Description + + +## Syntax + +`VARCHAR ltrim_in(VARCHAR str[, VARCHAR rhs])` + +When there is no rhs parameter, remove the spaces that appear consecutively in the parameter str starting from the left part; when there is an rhs parameter, search and remove any characters in the rhs character set at the left end of the string (regardless of order) + + +## Examples + +```sql +mysql> SELECT ltrim_in(' ab d') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT ltrim_in('ababccaab','ab') str; ++-------+ +| str | ++-------+ +| ccaab | ++-------+ +``` + +## Keywords + +LTRIM_IN diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/string-functions/rtrim_in.md b/versioned_docs/version-3.0/sql-manual/sql-functions/string-functions/rtrim_in.md new file mode 100644 index 00000000000..83e02be8581 --- /dev/null +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/string-functions/rtrim_in.md @@ -0,0 +1,59 @@ +--- +{ + "title": "RTRIM_IN", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +## Description + + +## Syntax + +`VARCHAR rtrim_in(VARCHAR str[, VARCHAR rhs])` + + +When there is no rhs parameter, remove the spaces that appear consecutively in the parameter str starting from the right part; when there is an rhs parameter, search and remove any characters in the rhs character set at the right end of the string (regardless of order) + + +## Examples + +```sql +mysql> SELECT rtrim_in('ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT rtrim_in('ababccaab','ab') str; ++--------+ +| str | ++--------+ +| ababcc | ++--------+ +``` + +## Keywords + +RTRIM_IN diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/string-functions/trim_in.md b/versioned_docs/version-3.0/sql-manual/sql-functions/string-functions/trim_in.md new file mode 100644 index 00000000000..4d7f861d119 --- /dev/null +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/string-functions/trim_in.md @@ -0,0 +1,57 @@ +--- +{ + "title": "TRIM_IN", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## Description + + +## Syntax + +`VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])` + +When there is no rhs parameter, remove the spaces that appear consecutively at the right and left beginning of the parameter str; when there is an rhs parameter, search and remove any characters in the rhs character set at both ends of the string (regardless of order) + + +## Examples + +```sql +mysql> SELECT trim_in(' ab d ') str; ++------+ +| str | ++------+ +| ab d | ++------+ + +mysql> SELECT trim_in('ababccaab','ab') str; ++------+ +| str | ++------+ +| cc | ++------+ +``` + +## Keywords + +TRIM_IN diff --git a/versioned_sidebars/version-2.1-sidebars.json b/versioned_sidebars/version-2.1-sidebars.json index e3862b645c4..f448e1b0a7d 100644 --- a/versioned_sidebars/version-2.1-sidebars.json +++ b/versioned_sidebars/version-2.1-sidebars.json @@ -886,6 +886,9 @@ "sql-manual/sql-functions/string-functions/trim", "sql-manual/sql-functions/string-functions/ltrim", "sql-manual/sql-functions/string-functions/rtrim", + "sql-manual/sql-functions/string-functions/trim_in", + "sql-manual/sql-functions/string-functions/ltrim_in", + "sql-manual/sql-functions/string-functions/rtrim_in", "sql-manual/sql-functions/string-functions/null-or-empty", "sql-manual/sql-functions/string-functions/not-null-or-empty", "sql-manual/sql-functions/string-functions/hex", diff --git a/versioned_sidebars/version-3.0-sidebars.json b/versioned_sidebars/version-3.0-sidebars.json index 564e9ff11de..b688511b0a7 100644 --- a/versioned_sidebars/version-3.0-sidebars.json +++ b/versioned_sidebars/version-3.0-sidebars.json @@ -924,6 +924,9 @@ "sql-manual/sql-functions/string-functions/trim", "sql-manual/sql-functions/string-functions/ltrim", "sql-manual/sql-functions/string-functions/rtrim", + "sql-manual/sql-functions/string-functions/trim_in", + "sql-manual/sql-functions/string-functions/ltrim_in", + "sql-manual/sql-functions/string-functions/rtrim_in", "sql-manual/sql-functions/string-functions/null-or-empty", "sql-manual/sql-functions/string-functions/not-null-or-empty", "sql-manual/sql-functions/string-functions/hex", --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org