Storing Formatted Array Value

Vino vino.bheeman at hotmail.com
Wed Nov 29 07:08:12 UTC 2017


Hi All,

Request your help, with the below code I am able to print the 
value of the array without brackects , but can some on help me on 
hot to store this output to a variable

Program:
import std.stdio;
import std.container;

void main()
{
    auto test = Array!string("Test1", "Test2");
    writefln("%(%s, %)",test[]); // output : "Test1", "Test2"

    // Similar like this
    auto res = `writefln("%(%s, %)",test[])`;
    writeln(res);
}

Output of res should look like : "Test1", "Test2" (Without [] 
brackets).


From,
Vino.B




More information about the Digitalmars-d-learn mailing list