diff --git a/src/Nibbler.cpp b/src/Nibbler.cpp index 77584cb84..73d2d47f9 100644 --- a/src/Nibbler.cpp +++ b/src/Nibbler.cpp @@ -1175,6 +1175,14 @@ bool Nibbler::skipRx (const std::string& regex) } #endif +//////////////////////////////////////////////////////////////////////////////// +void Nibbler::getRemainder (std::string& result) +{ + if (_cursor < _length) + result = _input.substr (_cursor); +} + + //////////////////////////////////////////////////////////////////////////////// bool Nibbler::skipAllOneOf (const std::string& chars) { diff --git a/src/Nibbler.h b/src/Nibbler.h index a816affc6..4b095b825 100644 --- a/src/Nibbler.h +++ b/src/Nibbler.h @@ -93,6 +93,8 @@ public: bool skipRx (const std::string&); #endif + void getRemainder (std::string&); + char next (); std::string next (const int quantity);