-
Notifications
You must be signed in to change notification settings - Fork 257
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
base: master
Are you sure you want to change the base?
[doc]str func #1860
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
语法上
- 使用 code block
- 不要带类型
- 有个别的参数的尖括号位置弄错了
|
||
### example | ||
`NOT_NULL_OR_EMPTY (<str>)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用code block 而不是 inline code
`NOT_NULL_OR_EMPTY (<str>)` | |
```sql | |
NOT_NULL_OR_EMPTY (<str>) | |
``` |
|
||
### example | ||
`VARCHAR sub_replace(<str>, <new_str>, <start[, len]>)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要带类型
`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); |
There was a problem hiding this comment.
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 表示替换操作开始的位置,可选参数,表示要替换的子字符串长度 | |
There was a problem hiding this comment.
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> ]
Versions
Languages
Docs Checklist