diff --git a/src/main/java/com/github/parboiled1/grappa/buffers/CharSequenceInputBuffer.java b/src/main/java/com/github/parboiled1/grappa/buffers/CharSequenceInputBuffer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/parboiled1/grappa/buffers/CharSequenceInputBuffer.java
+++ b/src/main/java/com/github/parboiled1/grappa/buffers/CharSequenceInputBuffer.java
@@ -132,4 +132,10 @@ public final class CharSequenceInputBuffer
     {
         return Futures.getUnchecked(lineCounter).getNrLines();
     }
+
+    @Override
+    public int length()
+    {
+        return charSequence.length();
+    }
 }
diff --git a/src/main/java/com/github/parboiled1/grappa/buffers/InputBuffer.java b/src/main/java/com/github/parboiled1/grappa/buffers/InputBuffer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/parboiled1/grappa/buffers/InputBuffer.java
+++ b/src/main/java/com/github/parboiled1/grappa/buffers/InputBuffer.java
@@ -91,4 +91,6 @@ public interface InputBuffer
      * @return number of lines in the input buffer.
      */
     int getLineCount();
+
+    int length();
 }
Add a .length() method to InputBuffer

Will allow in the long run to rework the "end of input" matcher. and to get rid
of EOI.