Archive for June 6th, 2006

ActionScript Search and Replace

Mario Laflamme June 6th, 2006 Add comment

ActionScript doesn’t provide a built in String.replace() function to search and replace text in a string. Then, here is a small function (but very effective) which is a good alternative.

function replace(search, replace, subject) {
    return subject.split(search).join(replace);
}

Schedule

June 2006
M T W T F S S
« May   Jul »
 1234
567891011
12131415161718
19202122232425
2627282930