substitute_string 函数
替换子串的第一次出现。
语法
StringTools:-Substitute(text, old, new)substitute_string(text, old, new)
参数与选项
text | 文本值,通常写在引号中。 |
|---|---|
old | 要替换的子串。 |
new | 替换后的文本。 |
示例
- 首次替换
StringTools:-Substitute('a-b-a', 'a', 'x')返回 x-b-a。
替换子串的第一次出现。
StringTools:-Substitute(text, old, new)substitute_string(text, old, new)text | 文本值,通常写在引号中。 |
|---|---|
old | 要替换的子串。 |
new | 替换后的文本。 |
StringTools:-Substitute('a-b-a', 'a', 'x')返回 x-b-a。