Is there a static property in Action similar to that in the String object in .net to check if a string is empty, that is String.Empty.
Thanks
The following will catch all of these:
import mx.utils.StringUtil;
var str:String
if(!StringUtil.trim(str)){
...
}
You can simply do:
if(string)
{
// String isn't null and has a length > 0
}
else
{
// String is null or has a 0 length
}
This works because the string is coerced to a boolean value using these rules:
String -> Boolean = "false if the value is null or the empty string ( "" ); true otherwise."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With