ZennoLab Assemblies Documentation
Split Method
Example 
ZennoLab.Macros Namespace > TextProcessing Class : Split Method

Type: System.String

The source string.

Type: System.String

Delimiter for text in the string.

Type: System.String

The number of string after splitting.

Splits the string.
Syntax

Parameters

sourceString

Type: System.String

The source string.

separator

Type: System.String

Delimiter for text in the string.

number

Type: System.String

The number of string after splitting.

Return Value

Type: System.String

A new string after splitting.

Example
The following example shows call the Split method.
var result = Macros.TextProcessing.Split("first;second;third;fourth;fifth", ";", "2").First();
return result;
 
// result = "second"
$result = Macros::TextProcessing::Split("first;second;third;fourth;fifth", ";", "2")->First();
return $result;
 
// result = "second"
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

TextProcessing Class
TextProcessing Members