For the complete documentation index, see llms.txt. This page is also available as Markdown.

BooleanFormat

Returns the value formatted as a boolean string

Method Signature

BooleanFormat(value=[any])

Arguments

Argument
Type
Required
Description
Default

value

any

true

The value to cast as a boolean and return the string value

Examples

1 is definitely true

Run Example

booleanFormat( 1 );

Result: true

0 is definitely false

Run Example

booleanFormat( 0 );

Result: false

Negative -1 is true as well

Run Example

Result: true

And even a number larger then 1 is true

Run Example

Result: true

String representation of true is interpreted as true

Result: true

String representation of false is interpreted as false

Result: false

YES is recognized as synonym for true

Result: true

NO is recognized as synonym for false

Result: false

An empty string results in false

Result: false

Additional Examples

Run Example

Deprecated Alias

trueFalseFormat() is a deprecated alias for booleanFormat() and is planned for removal in the 2.0 release.

Last updated

Was this helpful?