structIsEmpty

Determines whether a structure contains data.

structIsEmpty(structure) → returns boolean

Member Function Syntax

someStruct.isEmpty()

Argument Reference

structure struct
Required

Structure to test

Examples
Sample code invoking the structIsEmpty function

myStruct={};
writeOutput( structIsEmpty(myStruct) );

Expected Result: true

myStructWithThings={ "one": "foo", "two": "bar"};
writeOutput( structIsEmpty(myStructWithThings) );

Expected Result: false

CF 11+ Lucee 4.5+

myStruct={};
writeOutput( myStruct.IsEmpty() );

Expected Result: true

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub