how to Replace a text inside an Array.
Hi there!
This is a sample code to demonstrate what I want:
var str:String = "This@ is\nJust a\ntest and\nI@ am\nTesting";
var a:Array = str.split("\n");
for (var i:uint = 0;i<a.length;i++)
{
a.replace("@","#");
trace(a);
}
What I'm getting is:
This@ is
Just a
test and
I@ am
Testing
What I'm EXPECTING to get is:
This# is
Just a
test and
I# am
Testing
Any help would be appreciated please. thanks a lot.
