Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: IEnumerable<string> Split(this string, int)

Declaration

public static IEnumerable<string> Split(
    this string str,
    int chunkSize
)

Summary

Splits a string into chunks of equal size. The last chunk may be smaller than chunkSize, but all chunks, if any, will contain at least 1 character.

Parameters

this stringstr String to split into chunks.
intchunkSize Size of each chunk. Must be greater than zero.

Returns

A lazy-evaluated collection containing the chunks from the string.