forked from zzzprojects/Z.ExtensionMethods
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathString.Split.cs
More file actions
28 lines (26 loc) · 1.37 KB
/
Copy pathString.Split.cs
File metadata and controls
28 lines (26 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2015 ZZZ Projects. All rights reserved
// Licensed under MIT License (MIT) (https://github.com/zzzprojects/Z.ExtensionMethods)
// Website: http://www.zzzprojects.com/
// Feedback / Feature Requests / Issues : http://zzzprojects.uservoice.com/forums/283927
// All ZZZ Projects products: Entity Framework Extensions / Bulk Operations / Extension Methods /Icon Library
using System;
public static partial class Extensions
{
/// <summary>
/// Returns a String array containing the substrings in this string that are delimited by elements of a specified
/// String array. A parameter specifies whether to return empty array elements.
/// </summary>
/// <param name="this">The @this to act on.</param>
/// <param name="separator">A string that delimit the substrings in this string.</param>
/// <param name="option">
/// (Optional) Specify RemoveEmptyEntries to omit empty array elements from the array returned,
/// or None to include empty array elements in the array returned.
/// </param>
/// <returns>
/// An array whose elements contain the substrings in this string that are delimited by the separator.
/// </returns>
public static string[] Split(this string @this, string separator, StringSplitOptions option = StringSplitOptions.None)
{
return @this.Split(new[] {separator}, option);
}
}