var str:String = "AS3 rocks!";
var search:String = "AS3";
var replace:String = "Actionscript 3";
function strReplace(str:String, search:String, replace:String):String {
return str.split(search).join(replace);
}
trace(strReplace(str, search, replace)); //Outputs Actionscript 3 rocks!
Welcome to my actionscript snippet library!
Actionscript Snips is a small repository of actionscript code that aims to save developers and designers time when developing a website.
Search And Replace Characters In String
Posted by
admin
on Sunday, July 19, 2009
Labels:
Strings
Simple solution for replacing characters in a string
6 comments:
Muchas gracias por el codigo...
limpio para pasarlo al proyecto.
Nuevamente, muchas gracias.
Thank you very much! Saved me a lot of work.
Thank you man, nice way.
Very useful. Thanks.
Very Nice Blog, Thanks for sharing such a nice blog. It is very simple to use while being compatible with all the popular versions of Windows find and replace in word
Thanks for sharing this article with us ! This is so useful article. I hope keep sharing this type blog !
Best Search and Replace Software
Post a Comment