Determine whether a given value is empty.
We check for emptiness of
anything that can be casted to: Array, Struct, Query, or String.
myStruct = {};
writeOutput( structIsEmpty( myStruct ) );
myStructWithThings = {
"one" : "foo",
"two" : "bar"
};
writeOutput( structIsEmpty( myStructWithThings ) );
myStruct = {};
writeOutput( myStruct.IsEmpty() );
// Non empty struct
animals = {
COW : "moo",
PIG : "oink"
};
// Empty struct
farm = {};
// StructIsEmpty(animals)
echo( "<p>Animals struct is empty: " & StructIsEmpty( animals ) & "</p>" );
// StructIsEmpty(farm)
echo( "<p>Farm struct is empty: " & StructIsEmpty( farm ) & "</p>" );