put string[] into a appender without loop?
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Sep 21 16:51:41 PDT 2014
On Sun, 21 Sep 2014 23:41:56 +0000
AsmMan via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:
> I'd like to copy an array string into a appender!string() but I
> can't see how to do this without loop myself over the string
> array. Is there a native function or should I write it myself?
hm... '.put' should work. i.e.
string s = `something`;
auto ap = appender!string();
ap.put(s);
// now ap.data returns `something`
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140922/a62bab78/attachment-0001.sig>
More information about the Digitalmars-d-learn
mailing list