Um... A hard minimum line size, or a hard maximum? (your description & example disagree)
For a hard max, do a google search for "C# Word Wrap" (and if I remember, I'll post mine to my blog -- if I forget, I'm sure there are others out there)
My post could use tweaking to make it a better design document <g>.
Word wrap is the key as with laying out text on a page so to speak...one would not want chop a word in the middle but move it down to the next line. So I guess the rule would be no more words over the line size with the knowledge that lines returned would be smaller or equal to the total characters specified.
My post here on the MS forum is primarily to find out if I have overlooked any Microsoft C#/.Net functionality within the framework which speaks to this issue, either directly or indirectly.
You might consider using a Regular Expression... the following is quite short should work as you specified:
string test = "this is an example using a regular expression to wrap some text in lines of ten chars."; MatchCollection matches = Regex.Matches (test, @".{1,10}(\s|$)"); foreach (Match m in matches) { Console.WriteLine (m.Value); }
This won't work properly if you expect to have words longer than 10 characters: you will only get the last ten chars. But as you didn't provide a specification for that case I'm allowed to assume it as implementation dependent ;)