Author Topic: strReplace - Replacing multiple characters at once? (New question)  (Read 1458 times)

Is there a way to make strReplace case insensitive? Or is there another command for it?

How would I replace multiple characters at once?
« Last Edit: March 21, 2012, 09:25:53 PM by Electrk »

Not sure, but try striReplace.


Thanks, guys.
Also, how would I replace multiple characters at once?

I'm sure there's a more efficient way, but you could just stack them up:
Code: [Select]
striReplace(striReplace(striReplace("thisxisyaztest","x"," "),"y"," "),"z"," ");

I'm sure there's a more efficient way, but you could just stack them up:
Code: [Select]
striReplace(striReplace(striReplace("thisxisyaztest","x"," "),"y"," "),"z"," ");

I was thinking something like that, but with variables.

I'm sure there's a more efficient way, but you could just stack them up:
Code: [Select]
striReplace(striReplace(striReplace("thisxisyaztest","x"," "),"y"," "),"z"," ");
It's easier to just do something like this:

Code: [Select]
%blah = strReplace(%blah,"foo","bar");
%blah = strReplace(%blah,"thing1","thing2");
%blah = strReplace(%blah,"run","walk");

echo(%blah);