put string[] into a appender without loop?
    Vladimir Panteleev via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Sun Sep 21 17:30:43 PDT 2014
    
    
  
On Monday, 22 September 2014 at 00:18:03 UTC, AsmMan wrote:
> this give undefined identifier: 'put' error. (std.array is 
> already included, buffer.put(string) doesn't give same error)
You need to import std.range.
> The copy of an array doesn't happen often as string but do 
> suggest to I want something else instead of appender?
No, I was just thinking aloud about how Appender could be 
improved in the future.
To minimize allocations right now, you could write your own 
put-like function which calls Appender.reserve.
    
    
More information about the Digitalmars-d-learn
mailing list