Making enum join variadic

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 1 16:10:07 PDT 2014


Nordlöw:

> How can I make `join` variadic (by filling in njoin) in the 
> following code?

When you have a D tuple (not Phobos tuple), and it contains 
values all of the same type, you can turn it into an array with 
just:

[mytuple]

Once you have an array of strings, you can use the normal phobos 
function to join the strings as you desire.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list