Repeating the same character multiple times in a string

Hello,

If I wanted to have a string with 225 dashes is there a way to do that without manually typing out 225 dashes?

Thank you in advance for your help!

1 Like

Hi @Sahil_J_Patel - Please try like this…

string.join("",Enumerable.Repeat("-",225))

Hope this helps…

2 Likes

Hi,

Another solution:

new String("-"C,225)

Regards,

3 Likes

that really cool, but lets do it on char base:
grafik

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.