What is the quickest and easiest way (in Classic ASP) to check if a string has some string (that has a length greater than 0) i.e. NOT \"Null\", \"Nothing\", \"Empty\", or \
Here's a one-liner that dodges all the trouble with Null
by concatenating the value with an empty string. It works for Null
, Empty
, ""
, and, of course, strings with actual length! The only one it doesn't (nor shouldn't) work for is Nothing
, because that's for object variables, of which a string is not.
isNullOrEmpty = (Len("" & myString) = 0)