Converts value to boolean type
ToBoolean(1) → true ToBoolean("no") → false
ToBoolean(value, [replaceInvalidWith])
value - A value to convert into boolean
value
[replaceInvalidWith] - [optional: null by default**]** - invalid values will be replaced with this parameter
[replaceInvalidWith]
We support the following text values (registered independent):
'true', 't', 'yes', 'y', 'on', '1' return true
'false', 'f', 'no', 'n', 'off', '0' return false
Last updated 1 year ago