[] (存取字元元素)
描述
允许去取得字串中的字元。
语法
char thisChar = string1[n]
参数
thisChar
(char 型别) 字元变数
string1
String 物件 (字串)
n
(int 型别) 数字变数
回传
字串中第 n
个字元。与呼叫 charAt() 的结果相同。
范例
See also
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.