find()

描述

find() 可以從串流中讀取資料,並且找到給定長度的目標字串。假如有找到目標字串,則回傳 true,一段時間內沒找到目標字串,則回傳 false。

這個函式是 Stream 類別的一部分,它可以被任何繼承 Stream 的類別呼叫 (例如:Wire、Serial 等等) 。

語法


stream.find(target)

參數

stream : 一個類別的實例,這個類別是繼承於 Stream
target : 要找的字串 (char string)

回傳

布林值

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.