Created
February 21, 2023 16:02
-
-
Save trycf/092bc208edbcca72e7f42d863e7b304c to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
function doesAKeyHaveAWhiteSpace(sct) { | |
loop struct=sct index="local.k" item="local.v" { | |
if(trim(k)!=k) return true; | |
} | |
return false; | |
} | |
sct={"dsName ":"value"}; | |
dump(sct.dsName?:"Does not exist"); | |
dump(doesAKeyHaveAWhiteSpace(sct)); | |
dump(serialize(sct)); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment