| String

| Reference for Wiring 1.0 (ALPHA) 0019+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Class |  | String
Name |  | ### charAt()
Examples |  |
    String str = "CCCP";
    char c1 = str.charAt(0);
    char c2 = str.charAt(1);
    char c3 = str.charAt(str.length()-1);

    Serial.println(c1);  // Prints 'C'
    Serial.println(c2);  // Prints 'C'
    Serial.println(c3);  // Prints 'P'
Description |  | 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.
Syntax |  |
    charAt(index)
Parameters |  |
index |  | int: the index of the character
Returns |  | char
Usage |  | Web & Application