 |
 |
 |
 |
| Class |
|
String |
 |
|
|
| Name |
|
setCharAt() |
 |
|
|
| Examples |
|
String str = "CCCP";
str.setCharAt(0,'1');
Serial.println(c1); // Prints '1CCP'
|
|
|
| Description |
|
Sets 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 |
|
setCharAt(index, ch)
|
 |
|
|
| Parameters |
|
| index |
|
int: the index of the character
|
| ch |
|
char: the character
|
|
 |
|
|
| Returns |
|
none |
 |
|
|
| Usage |
|
Web & Application |
 |
|
|
|