ActionScript Search and Replace
Mario Laflamme June 6th, 2006
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);
}
Entry Filed under: ActionScript, Flash


Leave a Comment
Some HTML allowed
Trackback this post | Subscribe to the comments via RSS Feed