if (substituteString==undefined) do (
global substituteString
fn substituteString srcstr fromstr tostr =(
local result=srcstr
local fromIndex
while ((fromIndex=findString result fromstr)!=undefined) do (
result=replace result fromIndex fromstr.count tostr
)
result
)
)
str1 = "Hello World!"
a = "World"
b = "Rust"
m_1 = substituteString str1 a b
print m_1
3dsmax scripts中替换字符串
最新推荐文章于 2024-07-24 15:59:31 发布