booleanFormat

Evaluates the input as a boolean, and outputs either true or false. If not a boolean throws an exception.

booleanFormat(value) → returns string

Argument Reference

value numeric
Required

Compatibility

Lucee:

Version 5.1.0+ Due to Lucee's strict typing, the return value is NOT considered as a boolean

Examples
Sample code invoking the booleanFormat function

booleanFormat(1)

Expected Result: true

booleanFormat(0)

Expected Result: false

booleanFormat(-1)

Expected Result: true

booleanFormat(5)

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