private void Split(int iLine, FastColoredTextBox tb, string s) { string[] sep = s.Split(':'); tb.Selection.Start = new Place(0, iLine); tb.Selection.Expand(); string seperator; if (sep.Length == 3 && sep[1] == string.Empty) seperator = ":"; else seperator = sep[1]; var lines = tb.SelectedText.Split(seperator.ToCharArray()); tb.ClearSelected(); foreach (string line in lines) { tb.InsertText(line+"\n"); } tb.ClearCurrentLine(); }