Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc]str func #1860

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

[doc]str func #1860

wants to merge 2 commits into from

Conversation

yuanyuan8983
Copy link
Contributor

Versions

  • dev
  • 3.0
  • 2.1
  • 2.0

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

Copy link
Contributor

@morrySnow morrySnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

语法上

  1. 使用 code block
  2. 不要带类型
  3. 有个别的参数的尖括号位置弄错了


### example
`NOT_NULL_OR_EMPTY (<str>)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用code block 而不是 inline code

Suggested change
`NOT_NULL_OR_EMPTY (<str>)`
```sql
NOT_NULL_OR_EMPTY (<str>)
```


### example
`VARCHAR sub_replace(<str>, <new_str>, <start[, len]>)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要带类型

Suggested change
`VARCHAR sub_replace(<str>, <new_str>, <start[, len]>)`
```sql
sub_replace(<str>, <new_str>, <start> [, <len> ])
```


## 举例

```
mysql> select sub_replace("this is origin str","NEW-STR",1);
select sub_replace("this is origin str","NEW-STR",1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最好参数中间能加一些空格,提升阅读便捷程度

| -- | -- |
| `<str>` | 要进行替换操作的目标字符串 |
| `<new_str>` | 用于替换的目标字符串 |
| `<start[, len]>` | start 表示替换操作开始的位置,可选参数,表示要替换的子字符串长度 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start 和 len 是两个参数吧?
start 和 len 都可选吗?如果是的话应该是 [ ,<start> [ , <len> ] ]
如果只有 len 可选,应该是 ,<start> [ , <len> ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants