VtOscParser class final

Streaming OSC (Operating System Command) parser.

Feeds terminal bytes through the parser to extract OSC sequences such as window title changes.

final parser = VtOscParser();
// Feed an OSC 2 (set window title) sequence byte by byte
parser.addText('\x1b]2;My Title\x07');
// ... or feed individual bytes with addByte()

final command = parser.end();
print(command.windowTitle); // 'My Title'
parser.close();

Constructors

VtOscParser()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addByte(int byte) → void
Feeds one byte into the OSC parser.
addBytes(Iterable<int> bytes) → void
Feeds multiple bytes into the OSC parser.
addText(String text, {Encoding encoding = utf8}) → void
Feeds text bytes (UTF-8 by default) into the OSC parser.
close() → void
Releases parser resources.
end({int terminator = 0x07}) VtOscCommand
Finalizes parsing and returns a stable command snapshot.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Resets parser state.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited