diff --git a/ZString.cpp b/ZString.cpp index b9a0e58..9585b6f 100644 --- a/ZString.cpp +++ b/ZString.cpp @@ -561,9 +561,11 @@ namespace coreutils { return *this; } - void ZString::nextChar() { - if(!eod()) - ++cursor; + char ZString::nextChar() { + char temp = 0; + if(!eod()) + temp = *cursor++; + return temp; } } diff --git a/ZString.h b/ZString.h index c5b5c80..c844540 100644 --- a/ZString.h +++ b/ZString.h @@ -419,10 +419,11 @@ namespace coreutils { bool ifCRLF(); /// - /// + /// Returns the character at the cursor and advances the cursor one + /// position until end of data. /// - void nextChar(); + char nextChar(); /// ///