how do you create string of repeating characters?

  • Thread starter Thread starter Daniel Billingsley
  • Start date Start date
D

Daniel Billingsley

How do I create a string consisting of a specified character repeated a
specified number of times?

Something like
String.Fill('x', 10) to create "xxxxxxxxxx"

The best I see would be some hack using PadLeft() or (probably better) some
method written from scratch.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top