diff --git a/Cargo.toml b/Cargo.toml index fc3d61c..d26458f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "charred" -version = "0.1.4" +version = "0.1.5" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/src/tapemachine.rs b/src/tapemachine.rs index 432fa7b..c5786c3 100644 --- a/src/tapemachine.rs +++ b/src/tapemachine.rs @@ -52,6 +52,10 @@ impl CharTapeMachine { self.text.clone() } + pub fn get_index(&self) -> usize { + self.index + } + /// Returns the next char /// if there is any pub fn next_char(&mut self) -> Option {