Answers for "c# split string into chunks of whole words"

C#
0

divide string in chunks c#

static IEnumerable<string> ChunksUpto(string str, int maxChunkSize) {
    for (int i = 0; i < str.Length; i += maxChunkSize) 
        yield return str.Substring(i, Math.Min(maxChunkSize, str.Length-i));
}
Posted by: Guest on June-15-2020

Code answers related to "c# split string into chunks of whole words"

C# Answers by Framework

Browse Popular Code Answers by Language