Bug - Durations
- Duration were parsed as <int><unit> in A3, whereas <number><unit> is correct. - Added Nibbler::str method for internal access. - Nibbler::save, ::restore now return positions. Useful for extracting substrings. - Modified countdown.t to use the (now) correct units for durations.
This commit is contained in:
@@ -1116,15 +1116,21 @@ std::string Nibbler::next (const int quantity)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Nibbler::save ()
|
||||
std::string::size_type Nibbler::save ()
|
||||
{
|
||||
mSaved = mCursor;
|
||||
return mSaved = mCursor;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Nibbler::restore ()
|
||||
std::string::size_type Nibbler::restore ()
|
||||
{
|
||||
mCursor = mSaved;
|
||||
return mCursor = mSaved;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string& Nibbler::str () const
|
||||
{
|
||||
return mInput;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user