ICharStream input = CharStreams.fromStream(Console.OpenStandardInput()); input.Seek(5); // Seeks to position 5 in the input stream
ICharStream input = CharStreams.fromPath("myFile.txt"); input.Seek(10); // Seeks to position 10 in the input stream
ICharStream input = CharStreams.fromString("Hello World"); input.Seek(5); // Seeks to position 5 in the input streamThis example uses the Seek method to move the input stream position to index 5 in the string "Hello World". In order to use the ICharStream interface, you need to add the Antlr4.Runtime.dll assembly to your project's references or install the Antlr4 package using NuGet.