Skip to content

Commit 20b3804

Browse files
committed
docs: add rm_prefix SQL function
1 parent d42d8c5 commit 20b3804

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

en_US/data-integration/rule-sql-builtin-functions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,15 @@ Reverse a string. Example:
640640
reverse('hello') = 'olleh'
641641
```
642642

643+
### rm_prefix(String: string, Prefix: string) -> string
644+
645+
Removes the prefix `Prefix` from the string `String`. If `String` does not start with `Prefix`, the original `String` will be returned. Example:
646+
647+
```bash
648+
rm_prefix('foo/bar', 'foo/') = 'bar'
649+
rm_prefix('foo/bar', 'xxx/') = 'foo/bar'
650+
```
651+
643652
### rtrim(String: string) -> string
644653

645654
Same as `trim/1`, but only removes trailing whitespace characters from the `String`. Example:

zh_CN/data-integration/rule-sql-builtin-functions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,15 @@ replace('ab..cd..ef', '..', '**', 'trailing') = 'ab..cd**ef'
641641
reverse('hello') = 'olleh'
642642
```
643643

644+
### rm_prefix(String: string, Prefix: string) -> string
645+
646+
从字符串 String 中删除前缀 Prefix。示例:
647+
648+
```bash
649+
rm_prefix('foo/bar', 'foo/') = 'bar'
650+
rm_prefix('foo/bar', 'xxx/') = 'foo/bar'
651+
```
652+
644653
### rtrim(String: string) -> string
645654

646655
`trim/1`,但仅删除字符串 String 中尾随的空白字符。示例:

0 commit comments

Comments
 (0)