|
SOLUTIONS
|
MATHEMATICA 内置符号
StringReplacePart
StringReplacePart["string", "snew", {m, n}]
使用
替换
中从 m 到 n 位置的字符.
StringReplacePart["string", "snew", {{m1, n1}, {m2, n2}, ...}]
在多个位置插入
的副本.
StringReplacePart["string", {"snew1", "snew2", ...}, {{m1, n1}, {m2, n2}, ...}]
用
替换
中从
到
位置的字符.
更多信息更多信息
- StringReplacePart 以 StringPosition 返回的形式使用位置规格指定. »
- 当一个
列表被给定时,它的长度必须与位置列表的长度相同. » - 当多个位置被给定时,所有位置都是针对任何替换进行前的原
. - StringReplacePart[s, "", ...] 可被用来删除子字符串. »
版本 3 的新功能
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
