Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# string split by length

static IEnumerable<string> Split(string str, int chunkSize)
{
    return Enumerable.Range(0, str.Length / chunkSize)
        .Select(i => str.Substring(i * chunkSize, chunkSize));
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #split #length
ADD COMMENT
Topic
Name
6+3 =