mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Nibbler: Removed unused ::getWord method
This commit is contained in:
parent
78da4ffb90
commit
0c5984c517
3 changed files with 1 additions and 63 deletions
|
@ -535,32 +535,6 @@ bool Nibbler::getOneOf (
|
|||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// A word is a contiguous string of non-space, non-digit, non-punct characters.
|
||||
bool Nibbler::getWord (std::string& result)
|
||||
{
|
||||
auto i = _cursor;
|
||||
|
||||
if (i < _length)
|
||||
{
|
||||
while (!Lexer::isDigit ((*_input)[i]) &&
|
||||
!Lexer::isPunctuation ((*_input)[i]) &&
|
||||
!Lexer::isWhitespace ((*_input)[i]))
|
||||
{
|
||||
++i;
|
||||
}
|
||||
|
||||
if (i > _cursor)
|
||||
{
|
||||
result = _input->substr (_cursor, i - _cursor);
|
||||
_cursor = i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::skipN (const int quantity /* = 1 */)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue