Why can't you use RegEx?  A much slower way would be something like:

 

var inString:String = strTest;

while (true))

{

var outString:String;

            outString = inString.replace("t", "s");

            if (outString == inString)

                        break;

            inString = outString;

}

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of aceoohay
Sent: Friday, August 15, 2008 9:31 AM
To: [email protected]
Subject: [flexcoders] global replace with strings

 

Is there a way of replacing all occurences of one string with another 
without using regular expressions?

var strTest = "this is a test"

trace strTest.replace("t","s");

returns "shis is a test" I want "shis is a sess".

Paul

 

Reply via email to