ActionScript string replace ( str_replace() )
// June 11th, 2009 // Code
Another function I constantly find myself missing in ActionScript in the str_replace() which you can find in other languages. My memory is just as bad when it comes to remembering this function as it is when trying to remember the syntax for the FullScreen function so I’ll post it here as well.
function str_replace(haystack:String, needle:String, replacement:String) { var temp:Array = haystack.split(needle); return temp.join(replacement); }
Leave a Reply
You must be logged in to post a comment.
