Jumat, 02 Juli 2010

Actionscript - String Replace

Buzz It

Actionscript String Replace




Search and replace is a very useful thing to have. Actionscript dosent have a built-in function for this purpose. This is very simple function which can do the above thing.



Source code strreplace.as



/**

*

* Actionscript string replace

* http://www.webtoolkit.info/

*

**/


function str_replace(haystack, needle, replacement) {

temp = haystack.split(needle);

return temp.join(replacement);

}

Sumber : http://www.webtoolkit.info/actionscript-string-replace.html | Download Article



Tidak ada komentar:

Posting Komentar