peekChar method
- int index
Peeks at a character in the input queue at a specific index
without removing it.
Returns the Char at the given index
.
If index
is out of bounds or the queue is empty, returns Char.empty.
Implementation
Char peekChar(int index) {
return (index >= 0 && index < _charQueue.length) ? _charQueue.elementAt(index) : Char.empty;
}