mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Pig: Added ::peek
This commit is contained in:
parent
e790165a72
commit
ad8ee168e5
2 changed files with 8 additions and 0 deletions
|
@ -269,6 +269,13 @@ bool Pig::eos () const
|
|||
return _text[_cursor] == '\0';
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Peeks ahead - does not move cursor.
|
||||
int Pig::peek () const
|
||||
{
|
||||
return _text[_cursor];
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Pig::dump () const
|
||||
{
|
||||
|
|
|
@ -46,6 +46,7 @@ public:
|
|||
bool getRemainder (std::string&);
|
||||
|
||||
bool eos () const;
|
||||
int peek () const;
|
||||
|
||||
std::string dump () const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue