readStringUntil()
描述
readStringUntil()
可以从串流中读取字元,然后储存成字串后回传。这个函式会在收到结尾字元,或者指定时间内没收到任何值后停止 (时间的设定可参考 setTimeout())。
这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等) 。
语法
stream.readString(terminator)
参数
stream
: 一个类别的实例,这个类别是继承于 Stream
terminator
: 结尾字元 (char 型别)
回传
从串流读到的字串,直到指定的结尾字元。
See also
- Stream
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.