using System.Collections;
using System.Collections.Generic;
public static class Extensions
public static IEnumerable<string> SplitByLength(this string str, int maxLength)
for (int index = 0; index < str.Length; index += maxLength)
yield return str.Substring(index, Math.Min(maxLength, str.Length - index));
public static void Main()
string comments = "In the name of Robert of the House Baratheon, the First of his Name, King of the Andals and the Rhoynar and the First Men, Lord of the Seven Kingdoms and Protector of the Realm, by the word of Eddard of the House Stark, Lord of Winterfell and Warden of the North, I do sentence you to die.";
int commentEnumerator = 65;
foreach (string line in comments.SplitByLength(lineLength))
Console.WriteLine(string.Format("S{0} {1}", (char)commentEnumerator, line));