var sample:String = filterBox.text;
Based on the String I get from TextInput, a Button has to be disabled if the String has only white spaces and enabled only otherwise.
I want to check if the String has only white spaces.
Is/Are there any inbuilt methods in flex for this? I saw some answers for Java to use trim method. But its not available in Flex. Please help me out.
You can do the following
StringUtil.trim(string);
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/utils/StringUtil.html
String has a lot of methods which match for patterns you can find it here. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/String.html