Skip to content
FutureBlitz

    Install

    Import std.core.interfaces

    Printable

    std.core.interfaces

    interface

    Public Interface Printable

    What a value shows in a string, like "{point}".

    Examples

    Struct Point Implements Printable
        Field X: Int
        Field Y: Int
    
        Public Method ToString(): String => "({X}, {Y})"
    End Struct
    
    Expect("{Point(1, 2)}" == "(1, 2)")

    std/core/interfaces.fb, line 84

    • Method ToString(): String method #

      Its text, as a string interpolation like "{value}" shows it.

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