-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathString_length.xml
More file actions
executable file
·55 lines (39 loc) · 1.07 KB
/
String_length.xml
File metadata and controls
executable file
·55 lines (39 loc) · 1.07 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
52
53
54
55
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>length()</name>
<category>String</category>
<subcategory>Method</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
String str1 = "CCCP";
String str2 = "Rabbit";
int l1 = str1.length();
int l2 = str2.length();
println(l1 + ":" + l2); // Prints "4:6"
]]></code>
</example>
<description><![CDATA[
Returns the total number of characters included in the <b>String</b> as an integer number.
<br /><br />
People are often confused by the use of <b>length()</b> to get the size of a String and <b>length</b> to get the size of an array. Notice the absence of the parentheses when working with arrays.
]]></description>
<syntax>
<c>str</c>.length()
</syntax>
<parameter>
<label>str</label>
<description><![CDATA[String: any variable of type String]]></description>
</parameter>
<parameter>
<label></label>
<description></description>
</parameter>
<returns>int</returns>
<related>
</related>
<availability>1.0</availability>
<type>Method</type>
<partof>Core</partof>
</root>