A simple query if the function structKeyExists()
used in coldfusion is case-sensitive or not about its 'key'. I did not find a straight answer and wanted to post it here
This is just my 2 cents on a bit round-the-bush answer to a simple doubt if structKeyExists in coldfusion is case sensitive or not about its key. The usual search did not give me any straight answers so here it is. Nope its not case sensitive. That is:
<cfset foo={}>
<cfset structinsert(foo,"Yoosaf","Boy") />
<cfif structKeyExists(foo,"YOOSAF")>
<cfoutput>#foo.yoosaf#</cfoutput>
</cfif>
<cfif structKeyExists(foo,"yOOSAF")>
<cfoutput>#foo.yoosaf#</cfoutput>
</cfif>
Both the IF condition will return me true
I hope this helps