StringExtensionsSplit(String, String, StringSplitOptions) Method
Splits a string into substrings that are based on the specified string.
You can specify whether the substrings include empty array elements.
Namespace: DevCase.Extensions.StringExtensionsAssembly: 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,
StringSplitOptions options
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function Split (
sender As String,
separator As String,
options As StringSplitOptions
) As String()
Dim sender As String
Dim separator As String
Dim options As StringSplitOptions
Dim returnValue As String()
returnValue = sender.Split(separator,
options)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static array<String^>^ Split(
String^ sender,
String^ separator,
StringSplitOptions options
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member Split :
sender : string *
separator : string *
options : StringSplitOptions -> string[]
No code example is currently available or this language may not be supported.
- sender String
-
The source String.
- separator String
-
A string that delimits the substrings in this string.
- options StringSplitOptions
- RemoveEmptyEntries to omit empty array elements from the array returned.
None to include empty array elements in the array returned.
String
A
String array whose elements contain the substrings from this instance
that are delimited the specified string in
separator.
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).
This is a code example.
No code example is currently available or this language may not be supported.
Dim str As String = "Hello" & Environment.NewLine & "World"
Dim arr As String() = str.Split(ControlChars.NewLine, StringSplitOptions.RemoveEmptyEntries)
For Each item As String In arr
Console.WriteLine(item)
Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.