Cuemon .NET Framework
Chunk(String,Int32) Method

A System.String to chunk into a sequence of smaller string-slices for partitioned storage or similar.
The desired length of each string-slice in the sequence.
Returns a sequence that is chunked into string-slices of the specified length that is equivalent to value. Default is 1024.
Syntax
'Declaration
 
Public Overloads Shared Function Chunk( _
   ByVal value As String, _
   ByVal length As Integer _
) As IEnumerable(Of String)
public static IEnumerable<string> Chunk( 
   string value,
   int length
)

Parameters

value
A System.String to chunk into a sequence of smaller string-slices for partitioned storage or similar.
length
The desired length of each string-slice in the sequence.

Return Value

A sequence that is chunked into string-slices of the specified length that is equivalent to value.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionvalue is null.
System.ArgumentOutOfRangeExceptionlength is less or equal to 0.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

StringUtility Class
StringUtility Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback