forked from processing/processing-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbooleanconvert.xml
More file actions
executable file
·28 lines (23 loc) · 880 Bytes
/
booleanconvert.xml
File metadata and controls
executable file
·28 lines (23 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>boolean()</name>
<category>Data</category>
<subcategory>Conversion</subcategory>
<example>
<image></image>
<code><![CDATA[
String s = "true";
boolean b = boolean(s);
if (b) {
println("The boolean is true");
} else {
println("The boolean is false");
}
]]></code>
</example>
<description><![CDATA[
Converts an <b>int</b> or <b>String</b> to its boolean representation. For an <b>int</b>, any non-zero value (positive or negative) evaluates to true, while zero evaluates to false. For a <b>String</b>, the value <b>"true"</b> evaluates to true, while any other value (including <b>"false"</b> or <b>"hippopotamus"</b>) evaluates to false.<br />
<br />
When an array of <b>int</b> or <b>String</b> values is passed in, then a <b>boolean</b> array of the same length is returned.
]]></description>
</root>