ZennoLab Assemblies Documentation
Split Method
See Also  Example Send Feedback
ZennoLab.Macros Assembly > ZennoLab.Macros Namespace > TextProcessing Class : Split Method
sourceString

Type: System.String

Source string.

separator

Type: System.String

Delimiter for text in the string.

number

Type: System.String

The number of string after splitting.

Glossary Item Box

Splits the string.

Syntax

C# 
public static IEnumerable<string> Split( 
   string sourceString,
   string separator,
   string number
)

Parameters

sourceString

Type: System.String

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.
C#Copy Code
var result = Macros.TextProcessing.Split("first;second;third;fourth;fifth", ";", "2").First();
return result;
 
// result = "second"
PHPCopy Code
$result = Macros::TextProcessing::Split("first;second;third;fourth;fifth", ";", "2")->First();
return $result;
 
// result = "second"

Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.