/ Published in: ActionScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var newText:String = "The rain in Spain falls mainly on the plain"; var splitText:Array = newText.split("Spain"); newText = splitText.join("Barcelona"); // outputs "The rain in Barcelona falls mainly on the plain"