Chunk Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
Chunk(string)
Returns a sequence that is chunked into string-slices having a length of 1024 that is equivalent to value.
public static IEnumerable<string> Chunk(this string value)
Parameters
valuestringA string to chunk into a sequence of smaller string-slices for partitioned storage or similar.
Returns
- IEnumerable<string>
A sequence that is chunked into string-slices having a length of 1024 that is equivalent to
value.
Exceptions
- ArgumentNullException
valueis null.
Chunk(string, int)
Returns a sequence that is chunked into string-slices of the specified length that is equivalent to value. Default is 1024.
public static IEnumerable<string> Chunk(this string value, int length)
Parameters
valuestringA string to chunk into a sequence of smaller string-slices for partitioned storage or similar.
lengthintThe desired length of each string-slice in the sequence.
Returns
- IEnumerable<string>
A sequence that is chunked into string-slices of the specified
lengththat is equivalent tovalue.
Exceptions
- ArgumentNullException
valueis null.- ArgumentOutOfRangeException
lengthis less or equal to 0.