Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multiple string and variable replacements
#1
I would like to implement multiple string and variable replacements using a custom member function str.findreplaces. Is this possible?
I noticed that the member function str.fromn has similar characteristics.
Thanks in advance for any suggestions and help!

Macro Macro38
Code:
Copy      Help
out

str ss=
;_a_b_c_d

str a="hello"
str b=" "
str c="world"
str d="!"

ss.findreplace("_a" a); ss.findreplace("_b" b); ss.findreplace("_c" c); ss.findreplace("_d" d)
out ss

ss.findreplaces("_a" a "_b" b "_c" c "_d" d) ;;???
out ss


Forum Jump:


Users browsing this thread: 1 Guest(s)