a port of the Processing Visualization Language
Name

boolean()

Examples
String s = "true";

boolean b = boolean(s);

if (b) {

  println("The boolean is true");

} else {

  println("The boolean is false");

}
Description Converts a primitive datatype, string, or array to its boolean representation. The number 0 evaluates to false and all other numbers evaluate to true.
Syntax
boolean(val)
Parameters
val String, String[]
Returns boolean
Usage Web & Application
Related boolean

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub