structIsCaseSensitive

Determines whether a struct is case-sensitive.

structIsCaseSensitive(inputStruct) → returns boolean

Member Function Syntax

inputStruct.isCaseSensitive

This function requires Adobe ColdFusion 2021 and up.  Not supported on Lucee, etc.

Argument Reference

inputStruct struct
Required

The struct that needs to be checked for case sensitivity.

Links more information about structIsCaseSensitive

Examples
Sample code invoking the structIsCaseSensitive function

Show when the struct is explicitly set to casesensitive.

myStruct1=StructNew("casesensitive");
myStruct1.elem1="elEmOne";
myStruct1.elEm2="eLemtwO";
myStruct1.elem3="elemthree";
writeOutPut(StructIsCaseSensitive(myStruct1));

Expected Result: YES

Show when the struct is explicitly set to casesensitive.

myStruct1=StructNew("casesensitive");
myStruct1.elem1="elEmOne";
myStruct1.elEm2="eLemtwO";
myStruct1.elem3="elemthree";
writeOutPut(myStruct1.isCaseSensitive());

Expected Result: YES

Show when the struct is implicitly created.

myStruct4 = {"elem1":"elEmOne","elEm2":"eLemtwO","elem3":"elemthree"}
writeOutPut(StructIsCaseSensitive(myStruct4));

Expected Result: NO

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

Fork me on GitHub