Cuts a string into evenly sized parts.
[Visual Basic]
Public Shared Function CutUp( _
ByVal
text As
String, _
ByVal
chunkSize As
Integer _
) As
ArrayList
Parameters
-
text
- A string.
-
chunkSize
- Number of characters in a parts.
Return Value
An array list of strings.
Example
string text = "Hello world";
ArrayList list = StringUtil.Cut(test, 3);
// "Hel", "llo", " wo", "rld"
See Also
StringUtil Class | Sitecore Namespace