namespace TaikoWebUI.Utilities { public interface IStringUtil { List SplitIntoGroups(string str, int groupSize); } public class StringUtil : IStringUtil { public List SplitIntoGroups(string str, int groupSize) { List groups = new List(); for (int i = 0; i < str.Length; i += groupSize) { groups.Add(str.Substring(i, Math.Min(groupSize, str.Length - i))); } return groups; } } }