On Sat, 31 Jul 2010 05:37:41 -0400, Jason Spencer <[email protected]> wrote:

== Quote from Steven Schveighoffer ([email protected])'s article
I was wrong, I looked through the runtime and did not find such a
function.

std.string has a repeat() function.  Try:

import std.string;

void main()
{
   string divider = repeat("-", 5);
   writeln(divider);
}

It doesn't do the right thing. It allocates, then initializes, resulting in a double-initialization.

-Steve

Reply via email to