Modified nextChar method to return character under cursor before incrementing cursor.

This commit is contained in:
Brad Arant 2024-11-13 08:54:09 -08:00
parent 01180021b4
commit c70f135710
2 changed files with 8 additions and 5 deletions

View File

@ -561,9 +561,11 @@ namespace coreutils {
return *this; return *this;
} }
void ZString::nextChar() { char ZString::nextChar() {
char temp = 0;
if(!eod()) if(!eod())
++cursor; temp = *cursor++;
return temp;
} }
} }

View File

@ -419,10 +419,11 @@ namespace coreutils {
bool ifCRLF(); bool ifCRLF();
/// ///
/// /// Returns the character at the cursor and advances the cursor one
/// position until end of data.
/// ///
void nextChar(); char nextChar();
/// ///
/// ///