StringExtensionsProtectedSplit Method |
Splits a string, but allows you to protect using, for example, balanced parentheses.
Namespace: Bio.ExtensionsAssembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax public static IEnumerable<string> ProtectedSplit(
this string text,
char openParenCharacter,
char closeParenCharacter,
bool removeEmptyItems,
params char[] splitCharacters
)
<ExtensionAttribute>
Public Shared Function ProtectedSplit (
text As String,
openParenCharacter As Char,
closeParenCharacter As Char,
removeEmptyItems As Boolean,
ParamArray splitCharacters As Char()
) As IEnumerable(Of String)
public:
[ExtensionAttribute]
static IEnumerable<String^>^ ProtectedSplit(
String^ text,
wchar_t openParenCharacter,
wchar_t closeParenCharacter,
bool removeEmptyItems,
... array<wchar_t>^ splitCharacters
)
[<ExtensionAttribute>]
static member ProtectedSplit :
text : string *
openParenCharacter : char *
closeParenCharacter : char *
removeEmptyItems : bool *
splitCharacters : char[] -> IEnumerable<string>
Parameters
- text
- Type: SystemString
String to split - openParenCharacter
- Type: SystemChar
The open paren character - closeParenCharacter
- Type: SystemChar
The close paren character - removeEmptyItems
- Type: SystemBoolean
If true, the empty string will never by emitted. - splitCharacters
- Type: SystemChar
List of characters on which to split
Return Value
Type:
IEnumerableStringStrings between split characters that are not wrapped in protecting parens.
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).
See Also