public static class TextSetting { public static string[] Wrap(this string text, int max) { var charCount = 0; var lines = text.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); return lines.GroupBy(w => (charCount += (((charCount % max) + w.Length + 1 >= max) ? max - (charCount % max) : 0) + w.Length + 1) / max).Select(g => string.Join(" ", g.ToArray())).ToArray(); } }
Description
- The above coding used to make a limit numbers of word in one line
- This coding normally used to create an essay or paragraph internally
- Method to used it, put this coding in side class form and call it when need.
I just want to tell you that I am just very new to blogging and site-building and absolutely enjoyed your web page. Most likely I’m want to bookmark your blog . You surely have fantastic articles and reviews. Kudos for sharing with us your web-site.