-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathString_charAt.xml
More file actions
executable file
·53 lines (37 loc) · 1.04 KB
/
String_charAt.xml
File metadata and controls
executable file
·53 lines (37 loc) · 1.04 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>charAt()</name>
<category>String</category>
<subcategory>Method</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
String str = "CCCP";
char c1 = str.charAt(0);
char c2 = str.charAt(1);
char c3 = str.charAt(str.length()-1);
println(c1 + ":" + c2 + ":" + c3); // Prints "C:C:P"
]]></code>
</example>
<description><![CDATA[
Returns the character at the specified index. An index ranges from 0 to the length of the string minus 1. The first character of the sequence is at index 0, the next at index 1, etc.
]]></description>
<syntax>
<c>str</c>.charAt(<c>index</c>)
</syntax>
<parameter>
<label>str</label>
<description><![CDATA[String: any variable of type String]]></description>
</parameter>
<parameter>
<label>index</label>
<description><![CDATA[int: the index of the character]]></description>
</parameter>
<returns>char</returns>
<related>
</related>
<availability>1.0</availability>
<type>Method</type>
<partof>Core</partof>
</root>