Skip to content

Behavior not documented: Stream.find() consumes the bytes and also the matched byte. #704

Open
@yck011522

Description

@yck011522

I'm refering to this function: https://www.arduino.cc/reference/en/language/functions/communication/stream/streamfind/

The behavior of the function Stream.find() is that it will consume every single byte in the inBuffer until it fins the matching target.

This is not documented nor expected from the name find(). One can expect a find() function to behave similar to peek() but it is not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions