forked from processing/processing-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathString_equals.xml
More file actions
executable file
·51 lines (36 loc) · 1.05 KB
/
String_equals.xml
File metadata and controls
executable file
·51 lines (36 loc) · 1.05 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>equals()</name>
<category>String</category>
<subcategory>Method</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
String str1 = "CCCP";
String str2 = "CCCP";
// Tests to see if 'str1' is equal to 'str2'
if (str1.equals(str2) == true) {
println("Equal"); // They are equal, so this line will print
} else {
println("Not equal"); // This line will not print
}
]]></code>
</example>
<description><![CDATA[
Compares two strings to see if they are the same. This method is necessary because it's not possible to compare strings using the equality operator (==). Returns <b>true</b> if the strings are the same and <b>false</b> if they are not.
]]></description>
<syntax>
<c>str</c>.equals(<c>str</c>)
</syntax>
<parameter>
<label>str</label>
<description><![CDATA[String: any valid String]]></description>
</parameter>
<returns>Boolean</returns>
<related>
</related>
<availability>1.0</availability>
<type>Method</type>
<partof>Core</partof>
</root>