Function to convert a string to a boolean. This function is the equivalent of the method .toBoolean()
var mystring = "0"; var boolean =string_toBoolean(mystring);
Parameter | Data type | Required | Description |
---|---|---|---|
string | string | true | The string to convert |
Value | String Value |
---|---|
true | true or 1 |
false | false or 0 |
null | All values not listed above. Could not convert to boolean. |