to

Undocumented in source. Be warned that the author may not have intended to support it.
  1. String to(ValueT value)
    to
    (
    StringT : String
    ValueT
    )
    (
    auto ref ValueT value
    )
  2. SimpleResult!NumT to(ValueT value)
  3. SimpleResult!EnumT to(ValueT value)

Examples

static struct S
{
    int a;
    string b;
    bool c;
}

static struct SS
{
    string name;
    S s;
}

assert(127.to!String == "127");
assert(S(29, "yolo", true).to!String == `S(29, "yolo", true)`);
assert(SS("ribena cow", S(69, "swag", false)).to!String == `SS("ribena cow", S(69, "swag", false))`);

Meta