StructIsEmpty() - determine whether a structure contains data
StructIsEmpty.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>StructIsEmpty function example: how to determine whether a structure contains data</title>
</head>
<body>
<h2 style="color:HotPink">StructIsEmpty Function Example</h2>
<cfset Color=StructNew()>
<cfset Color.ID=1>
<cfset Color.Name="LightBlue">
<cfset Color.Value="##ADD8E6">
<cfoutput>
<b>
Color Structure Is Empty?: #StructIsEmpty(Color)#
</b>
</cfoutput>
<cfdump var="#Color#" label="Color">
<cfset Temp=StructClear(Color)>
<br />
<cfoutput>
<b>
Color Structure Is Empty[after remove all data]?: #StructIsEmpty(Color)#
</b>
</cfoutput>
<cfdump var="#Color#" label="Color[after clear]">
</body>
</html>
- IsStruct() - check whether a variable is a structure
- StructAppend() - append one structure to another
- StructClear() - remove all data from a structure
- StructFind() - find the value associated with a key in a structure
- StructInsert() - insert a key value pair into a structure
- StructKeyList() - get a list of keys from a structure
- StructNew() - create a structure
- StructUpdate() - update a structure key with a value
- cfdump - dump a structure