what's the C# equivalent of string$ from basic

Posted by Preet Sangha on Stack Overflow See other posts from Stack Overflow or by Preet Sangha
Published on 2010-04-15T21:51:50Z Indexed on 2010/04/15 21:53 UTC
Read the original article Hit count: 330

Filed under:
|

And is there an elegant linqy way to do it?

What I want to do is create string of given length with made of up multiples of another string up to that length

So for length - 9 and input string "xxx" I get "xxxxxxxxx" (ie length 9)

for a nun integral multiple then I'd like to truncate the line.

I can do this using loops and a StringBuilder easily but I'm looking to see if the language can express this idea easily.

(FYI I'm making easter maths homework for my son)

© Stack Overflow or respective owner

Related posts about c#

Related posts about string-manipulation