Re: string version of array

2017-11-14 Thread Timoses via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 14:00:54 UTC, Dr. Assembly wrote: On Tuesday, 14 November 2017 at 08:21:59 UTC, Tony wrote: On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: Thanks. That flipped function calling syntax definitely takes some getting used to. if you consider

Re: string version of array

2017-11-14 Thread Dr. Assembly via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 08:21:59 UTC, Tony wrote: On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? st

Re: string version of array

2017-11-14 Thread Tony via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? struct Foo { int x; } void main() { Foo[]

Re: string version of array

2017-11-14 Thread rikki cattermole via Digitalmars-d-learn
On 14/11/2017 8:16 AM, Andrea Fontana wrote: On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? struct Foo {    

Re: string version of array

2017-11-14 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? struct Foo { int x; } void main() { Foo[]

Re: string version of array

2017-11-14 Thread rikki cattermole via Digitalmars-d-learn
On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? struct Foo { int x; } void main() { Foo[] data = [Foo(1), Foo(2), Foo(3)]; import std.conv : text

string version of array

2017-11-13 Thread Tony via Digitalmars-d-learn
Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string?