From 7139ae895dd50d9dd1cbd2b3110c93f546cef798 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Mon, 25 Dec 2017 13:34:04 +0200 Subject: [PATCH] Added possibility to skip token stream until the end --- .../eu/svjatoslav/commons/string/tokenizer/Tokenizer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/eu/svjatoslav/commons/string/tokenizer/Tokenizer.java b/src/main/java/eu/svjatoslav/commons/string/tokenizer/Tokenizer.java index 80f9c4f..c80aeb1 100755 --- a/src/main/java/eu/svjatoslav/commons/string/tokenizer/Tokenizer.java +++ b/src/main/java/eu/svjatoslav/commons/string/tokenizer/Tokenizer.java @@ -198,4 +198,9 @@ public class Tokenizer { currentIndex = tokenIndexes.pop(); } + public void skipUntilDataEnd() { + tokenIndexes.push(currentIndex); + currentIndex = source.length(); + } + } -- 2.20.1