CSharp examples for System:String Split
Insert Separator Every Count
using System.Text.RegularExpressions; using System.Text; using System.Globalization; using System.Collections.Generic; using System;// ww w .j a va2 s.c om public class Main{ public static string InsertSeparatorEvery(string input, string separator, int count) { string ret = ""; for (int i = 0; i < input.Length; i++) { if (i + count < input.Length) ret += input.Substring(i, count); else ret += input.Substring(i); if (i != input.Length - 1) ret += separator; } return ret; } }