Stream class

find()

Stream::find, find, Stream.find

find() reads data from the stream until the target string of given length is found.

// PROTOTYPES
bool find(char *target);
bool find(char *target, size_t length); 

// SYNTAX
stream.find(target);        // reads data from the stream until the target string is found
stream.find(target, length);    // reads data from the stream until the target string of given length is found

Parameters:

  • stream : an instance of a class that inherits from Stream
  • target : pointer to the string to search for (char *)
  • length : length of target string to search for (size_t)

Returns: returns true if target string is found, false if timed out