diff --git a/.cproject b/.cproject new file mode 100644 index 0000000..aa9a1ad --- /dev/null +++ b/.cproject @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/main.cpp b/main.cpp index 635fa44..b9a3835 100644 --- a/main.cpp +++ b/main.cpp @@ -48,11 +48,13 @@ protected: template std::string readTill(iterator &start, const iterator &end, std::function limiter) { - while(start != end && !limiter(start)) { - ++start; + iterator current = start; + + while(current != end && !limiter(current)) { + ++current; } - return std::string(start, end); + return std::string(start, current); }