mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Pig: Added ::skip
This commit is contained in:
parent
09f23afc38
commit
6d47b1ba3a
2 changed files with 13 additions and 0 deletions
12
src/Pig.cpp
12
src/Pig.cpp
|
@ -40,6 +40,18 @@ Pig::Pig (const std::string& text)
|
|||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Pig::skip (int c)
|
||||
{
|
||||
if (_text[_cursor] == c)
|
||||
{
|
||||
++_cursor;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Pig::skipN (const int quantity)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue