StringExtensionsSplit(String, String, Int32, StringSplitOptions) Method

Splits a string into a maximum number of substrings based on the specified string.

You can specify whether the substrings include empty array elements.

Definition

Namespace: DevCase.Extensions.StringExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static string[] Split(
	this string sender,
	string separator,
	int count,
	StringSplitOptions options
)

Parameters

sender  String
The source String.
separator  String
A string that delimits the substrings in this string.
count  Int32
The maximum number of substrings to return.
options  StringSplitOptions
RemoveEmptyEntries to omit empty array elements from the array returned.

None to include empty array elements in the array returned.

Return Value

String
A String array whose elements contain the substrings from this instance that are delimited by the specified string in separator.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also