11
Apr
08

Simple Find and Replace Function

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

This is a simple but effective function allows you to search a string and replace characters

function searchAndReplace(holder:String, searchfor:String, replacement:String) {
		var temparray:Array = new Array();
		temparray = holder.split(searchfor);
		holder = temparray.join(replacement);
		return (holder);
	}

Found this useful? How about buying me a coffee - simply click here.


0 Responses to “Simple Find and Replace Function”


  1. No Comments

Leave a Reply




Close
E-mail It