Skip to content
FutureBlitz

    Install

    Import std.io.memory

    StringReader

    std.io.memory

    class

    Public Class StringReader Implements Reader, Seeker

    Reads a String's UTF-8 bytes, and moves around in them.

    Examples

    Local reader = StringReader("héllo")
    Expect(reader.Count == 6)
    Expect((Try ReadAllText(reader)) == "héllo")

    std/io/memory.fb, line 92

    • Public New(text: String) constructor #

      A StringReader of text's UTF-8 bytes.

    • Public Property Count: Int64 property #

      How many bytes the text has.

    • Public Method Read(into: Buffer<UInt8>): Int64 Throws IOError method #

      Reads up to into.Count of the text's bytes from where it is into into, moves on past them, and gives how many, or 0 at its end.

    • Public Method Seek(offset: Int64, origin: SeekOrigin): Int64 Throws IOError method #

      Moves to offset bytes from origin, and gives where it is now. Throws an IOError before its start.

    Report an issue with this page or with FutureBlitz on GitHub.