ToBoolean
Last updated
Converts value to boolean type
ToBoolean(1) → true
ToBoolean("no") → falseToBoolean(value, [replaceInvalidWith])
value - A value to convert into boolean
[replaceInvalidWith] - [optional: null by default**]** - invalid values will be replaced with this parameter
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