Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact
/*******************************************************************************

        Illustrates the basic console formatting. This is different than
        the use of tango.io.Console, in that Stdout supports a variety of
        printf-style formatting, and has unicode-conversion support

*******************************************************************************/

import tango.io.Stdout;

void main()
{
        // no formatting
        Stdout ("hello, sweetheart \u263a").newline;

        // text replacement
        Stdout.formatln ("{}, {} \u263a", "hello", "sweetheart");

        // indexed text replacement
        Stdout.formatln ("{1}, {0} \u263a", "sweetheart", "hello");
}