Skip to content

Commit 29c9915

Browse files
authored
docs: trim functions updates (#1650)
* updates * updates * updates
1 parent 219aa72 commit 29c9915

File tree

6 files changed

+82
-71
lines changed

6 files changed

+82
-71
lines changed

docs/en/sql-reference/20-sql-functions/06-string-functions/ltrim.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: LTRIM
33
---
44
import FunctionDescription from '@site/src/components/FunctionDescription';
55

6-
<FunctionDescription description="Introduced or updated: v1.2.659"/>
6+
<FunctionDescription description="Introduced or updated: v1.2.694"/>
77

8-
Removes specific characters from the beginning (left side) of a string.
8+
Removes all occurrences of any character present in the specified trim string from the left side of the string.
99

1010
See also:
1111

@@ -15,17 +15,17 @@ See also:
1515
## Syntax
1616

1717
```sql
18-
LTRIM(<string>, <trim_character>)
18+
LTRIM(<string>, <trim_string>)
1919
```
2020

2121
## Examples
2222

2323
```sql
24-
SELECT LTRIM('xxdatabend', 'xx');
24+
SELECT LTRIM('xxdatabend', 'xx'), LTRIM('xxdatabend', 'xy');
2525

26-
┌───────────────────────────┐
27-
│ ltrim('xxdatabend', 'xx') │
28-
├───────────────────────────┤
29-
│ databend │
30-
└───────────────────────────┘
26+
┌───────────────────────────────────────────────────────
27+
│ ltrim('xxdatabend', 'xx') │ ltrim('xxdatabend', 'xy') │
28+
├───────────────────────────┼───────────────────────────
29+
│ databend │ databend │
30+
└───────────────────────────────────────────────────────
3131
```

docs/en/sql-reference/20-sql-functions/06-string-functions/rtrim.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: RTRIM
33
---
44
import FunctionDescription from '@site/src/components/FunctionDescription';
55

6-
<FunctionDescription description="Introduced or updated: v1.2.659"/>
6+
<FunctionDescription description="Introduced or updated: v1.2.694"/>
77

8-
Removes specific characters from the end (right side) of a string.
8+
Removes all occurrences of any character present in the specified trim string from the right side of the string.
99

1010
See also:
1111

@@ -15,17 +15,17 @@ See also:
1515
## Syntax
1616

1717
```sql
18-
RTRIM(<string>, <trim_character>)
18+
RTRIM(<string>, <trim_string>)
1919
```
2020

2121
## Examples
2222

2323
```sql
24-
SELECT RTRIM('databendxx', 'xx');
24+
SELECT RTRIM('databendxx', 'x'), RTRIM('databendxx', 'xy');
2525

26-
┌───────────────────────────┐
27-
│ rtrim('databendxx', 'xx') │
28-
├───────────────────────────┤
29-
│ databend │
30-
└───────────────────────────┘
26+
┌──────────────────────────────────────────────────────
27+
│ rtrim('databendxx', 'x') │ rtrim('databendxx', 'xy') │
28+
├──────────────────────────┼───────────────────────────┤
29+
│ databend │ databend
30+
└──────────────────────────────────────────────────────
3131
```

docs/en/sql-reference/20-sql-functions/06-string-functions/trim-both.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
title: TRIM_BOTH
33
---
44

5-
Removes specific characters from both ends of a string.
5+
Removes all occurrences of the specified trim string from the beginning, end, or both sides of the string.
66

77
See also: [TRIM](trim.md)
88

99
## Syntax
1010

1111
```sql
12-
TRIM_BOTH(<string>, <trim_character>)
12+
TRIM_BOTH(<string>, <trim_string>)
1313
```
1414

1515
## Examples
1616

1717
```sql
18-
SELECT TRIM_BOTH('xxdatabendxx', 'xx');
18+
SELECT TRIM_BOTH('xxdatabendxx', 'xxx'), TRIM_BOTH('xxdatabendxx', 'xx'), TRIM_BOTH('xxdatabendxx', 'x');
1919

20-
┌─────────────────────────────────┐
21-
│ trim_both('xxdatabendxx', 'xx') │
22-
├─────────────────────────────────┤
23-
│ databend │
24-
└─────────────────────────────────┘
20+
┌─────────────────────────────────────────────────────────────────────────────────────────────────────
21+
│ trim_both('xxdatabendxx', 'xxx') │ trim_both('xxdatabendxx', 'xx') │ trim_both('xxdatabendxx', 'x') │
22+
├──────────────────────────────────┼─────────────────────────────────┼────────────────────────────────
23+
xxdatabendxx │ databend │ databend
24+
└─────────────────────────────────────────────────────────────────────────────────────────────────────
2525
```

docs/en/sql-reference/20-sql-functions/06-string-functions/trim-leading.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: TRIM_LEADING
33
---
44

5-
Removes specific characters from the beginning (left side) of a string.
5+
Removes all occurrences of the specified trim string from the beginning of the string.
66

77
See also:
88

@@ -12,17 +12,17 @@ See also:
1212
## Syntax
1313

1414
```sql
15-
TRIM_LEADING(<string>, <trim_character>)
15+
TRIM_LEADING(<string>, <trim_string>)
1616
```
1717

1818
## Examples
1919

2020
```sql
21-
SELECT TRIM_LEADING('xxdatabend', 'xx');
21+
SELECT TRIM_LEADING('xxdatabend', 'xxx'), TRIM_LEADING('xxdatabend', 'xx'), TRIM_LEADING('xxdatabend', 'x');
2222

23-
┌──────────────────────────────────┐
24-
│ trim_leading('xxdatabend', 'xx') │
25-
├──────────────────────────────────┤
26-
│ databend │
27-
└──────────────────────────────────┘
23+
┌────────────────────────────────────────────────────────────────────────────────────────────────────────
24+
│ trim_leading('xxdatabend', 'xxx') │ trim_leading('xxdatabend', 'xx') │ trim_leading('xxdatabend', 'x') │
25+
├───────────────────────────────────┼──────────────────────────────────┼─────────────────────────────────
26+
xxdatabend │ databend │ databend
27+
└────────────────────────────────────────────────────────────────────────────────────────────────────────
2828
```

docs/en/sql-reference/20-sql-functions/06-string-functions/trim-trailing.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: TRIM_TRAILING
33
---
44

5-
Removes specific characters from the end (right side) of a string.
5+
Removes all occurrences of the specified trim string from the end of the string.
66

77
See also:
88

@@ -12,17 +12,17 @@ See also:
1212
## Syntax
1313

1414
```sql
15-
TRIM_TRAILING(<string>, <trim_character>)
15+
TRIM_TRAILING(<string>, <trim_string>)
1616
```
1717

1818
## Examples
1919

2020
```sql
21-
SELECT TRIM_TRAILING('databendxx', 'xx');
21+
SELECT TRIM_TRAILING('databendxx', 'xxx'), TRIM_TRAILING('databendxx', 'xx'), TRIM_TRAILING('databendxx', 'x');
2222

23-
┌───────────────────────────────────┐
24-
│ trim_trailing('databendxx', 'xx') │
25-
├───────────────────────────────────┤
26-
│ databend │
27-
└───────────────────────────────────┘
23+
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────
24+
│ trim_trailing('databendxx', 'xxx') │ trim_trailing('databendxx', 'xx') │ trim_trailing('databendxx', 'x') │
25+
├────────────────────────────────────┼───────────────────────────────────┼──────────────────────────────────
26+
databendxx │ databend │ databend
27+
└───────────────────────────────────────────────────────────────────────────────────────────────────────────
2828
```

0 commit comments

Comments
 (0)