在文本字符串中用new_text替换old_text。
SUBSTITUTE (text, old_text, new_text, [instance_num])
Argument | 描述 | Required/Optional |
---|---|---|
Text | The text or the reference to a cell containing text for which you want to substitute characters. | Required |
Old_text | The text you want to replace. | Required |
New_text | The text you want to replace old_text with. | Required |
Instance_num | 指定要用new_text替换old_text的出现。 如果指定instance_num,则仅替换old_text的该。否则,文本中每次出现的old_text都将更改为new_text。 | Optional |
当您要替换文本字符串中的特定文本时,请使用SUBSTITUTE。
当您要替换文本字符串中特定位置出现的任何文本时,请使用REPLACE。
Excel 2007,Excel 2010,Excel 2013,Excel 2016
链接:https://www.learnfk.com/javascript/advanced-excel-statistical-substitute-function.html
来源:LearnFk无涯教程网
这一章《JavaScript - SUBSTITUTE 函数》你学到了什么?在下面做个笔记吧!做站不易,你的分享是对我们最大的支持
在 Angular 中添加项目时,有没有办法移动到特定索引?
str.replace(/^/gm, "\t") 的预期行为是什么
document.getElementById().value - 覆盖或知道何时访问