string initialization question.

Jason Spencer spencer8 at sbcglobal.net
Sat Jul 31 02:37:41 PDT 2010


== Quote from Steven Schveighoffer (schveiguy at yahoo.com)'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);
}

Jason


More information about the Digitalmars-d-learn mailing list