User Tools

Site Tools


Sidebar

string:toboolean

toBoolean()

Method to convert a string to a boolean. This method is the equivalent of the function string_toBoolean()

Usage

var mystring = "0";
var boolean = mystring.toBoolean();

Parameters

This method has no parameters.

Return Values

Value String Value
true true or 1
false false or 0
null All values not listed above. Could not convert to boolean.
string/toboolean.txt · Last modified: 2017/06/03 13:55 (external edit)