String Search & Replace (AS2 & AS3)

function strReplace($str:String, $search:String, $replace:String):String
return $str.split($search).join($replace);
var str:String = new String();
str = "we are Khmer!"

The "split" function splits the string at the word ($search) you're searching for. And the "join" inserts the new word ($replace) between the elements, concatenates them, and returns the resulting string


Popular posts from this blog

Set limit wp_nav_menu

Conut document have children that are show in navigation