Nibbler::backN
- Added a method to support multi-byte backstep through a string. - Added unit tests.
This commit is contained in:
@@ -1077,6 +1077,18 @@ bool Nibbler::skipRx (const std::string& regex)
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::backN (const int quantity /*= 1*/)
|
||||
{
|
||||
if (_cursor >= quantity)
|
||||
{
|
||||
_cursor -= quantity;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Nibbler::getRemainder (std::string& result)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user