How to catenate a string multiple times ?

1100110 0b1100110 at gmail.com
Sat Mar 16 08:41:02 PDT 2013


On 03/16/2013 10:39 AM, 1100110 wrote:
> On 03/16/2013 10:29 AM, Peter Sommerfeld wrote:
>> Cannot find a reference: What is the best way
>> to catenate a string multiple times ?
>> Unfortunately this this does not work ;-)
>>
>> string tab = "..";
>> tab = tab * 4; // -> "........"
>>
>> Peter


foreach(0..4)
> write("...");

or
str = str ~ "...";

I shoulda proofread that.


More information about the Digitalmars-d-learn mailing list