Can anyone suggest a way to remove extra whitespaces from a string that exists in a Flash variable?
March 24, 2004 7:29 AM
Subscribe
Can anyone suggest a way to remove extra whitespaces from a string that exists in a Flash variable? [more inside]
I'm messing around with a Flash animation that started out as a
JavaScript. It generates a nonsensical phrase from sentence fragments, but the result may have multiple whitespaces in it, and I need to remove them (unlike the JavaScript version, which automatically discards multiple whitespaces...).
I think maybe the condenseWhite method may do this, but I can't figure out a simple way to implement it. Has anyone done this before?
posted by jpburns to computers & internet (9 comments total)
String.split(" ").join("");
Replacing String with whatever your variable is called.
posted by malphigian at 7:46 AM on March 24, 2004