Mark Ii wrote:
Hanna Roberts wrote:
Mark Ii wrote:. . .
You are welcome. You said my code almost works. Can you kindly please give situations where it does not work so that I can write you a better version of the code?
Campbell Ritchie wrote:In which case, I think I shall go back to my suggestion about a StringBuilder.You could use a StringJoiner with space as the middle text for each line and a further StrngJoiner with line end as the middles text to join all the lines into one. You don't need any start or end text.