Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
dsfsfsdf
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { private IList<string> SplitIntoChunks(string text, int chunkSize) { List<string> chunks = new List<string>(); int offset = 0; while (offset < text.Length) { int size = Math.Min(chunkSize, text.Length - offset); chunks.Add(text.Substring(offset, size)); offset += size; } return chunks; } public static void Main(string[] args) { Program pr = new Program(); IList<string> str = pr.SplitIntoChunks("hdfhgadfhawjhdyy", 4); foreach(string m in str) { int strCount = m.Count(); Console.WriteLine(m); Console.WriteLine(strCount); foreach(char n in m) { int count = 0; Console.WriteLine(n); } } } } }
run
|
edit
|
history
|
help
0
ExtensionDateTime
nikk
LeftAndRightShiftStrings
Insertion Sort
un poco de strings
C# - Integer to Roman
out parameters
Public access specifier
Create Sealed Class Object
Convert string to TimeSpan in C#