trimming strings with actionscript 3

donpal picture donpal · May 26, 2010 · Viewed 24.9k times · Source

I'm trying to trim white spaces from front and end of a string. Looks like as3 does not have a trim function. Anyone aware of how it can be done?

Answer

bug-a-lot picture bug-a-lot · May 26, 2010

You have a method that's called trim in the utility class called StringUtil => http://livedocs.adobe.com/flex/3/langref/mx/utils/StringUtil.html#trim%28%29