Transform static immutable string array to tuple.

H. S. Teoh hsteoh at
Sun Feb 19 11:53:06 UTC 2023

On Sun, Feb 19, 2023 at 11:08:34AM +0000, realhet via Digitalmars-d-learn wrote:
> Hello,
> Is there a better way to transform a string array to a tuple or to an
> AliasSeq?
> ```
> mixin(customSyntaxPrefixes.format!`tuple(%(%s,%))`)
> ```
> I'd like to use this as variable length arguments passed to the
> startsWith() std function (as multiple needles).

In situations like this it's often better to define your dats as an
AliasSeq to begin with, since it's easier to covert that to an array
than the other way round.


I don't trust computers, I've spent too long programming to think that they can get anything right. -- James Miller

More information about the Digitalmars-d-learn mailing list