@head @module memorystream @title memorystream: Memory-based streams
This module defines the MemoryStream class that allows creating memory-based streams. @see The @ref{Stream} class is defined in the @ref{io} module. @end
MemoryStream supports all the @ref{Stream} methods and the following additional methods: @fun seek(n as Int) @desc Move the stream pointer to the specified index. 0 refers to the start of the stream, 1 to the position between the first and the second character, and so on. @end @fun pos() as Int @desc Return the current stream pointer index. @end @fun size() as Int @desc Return the length of the stream contents. @end @fun contents() as Str @desc Return the contents of the stream as a string. This method works also if the stream is closed. @end