Serial.LookAhead

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

Serial.LookAhead([Encoding as TextEncoding ]) As String

Supported for all project types and targets.

Returns all the unread characters in the buffer without deleting them from the buffer. The optional Encoding parameter enables you to specify the text encoding of the data to be returned. Use the Encodings module to specify a text encoding.

Example

This example stores the lookahead text in a TextField.

TextField1.Text = Serial1.LookAhead(Encodings.UTF8)