StringExtensionsRemove Method
Removes characters from the source string, based on a predicate.
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 Remove(
this string str,
Func<char, bool> predicate
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function Remove (
str As String,
predicate As Func(Of Char, Boolean)
) As String
Dim str As String
Dim predicate As Func(Of Char, Boolean)
Dim returnValue As String
returnValue = str.Remove(predicate)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static String^ Remove(
String^ str,
Func<wchar_t, bool>^ predicate
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member Remove :
str : string *
predicate : Func<char, bool> -> string
No code example is currently available or this language may not be supported.
- str String
-
The source string.
- predicate FuncChar, Boolean
-
A function to test each character for a removal condition.
String
The resulting string.
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 World!"
' Remove punctuation characters from the source string.
Dim clean As String = str.Remove(Function(c As Char) Char.IsPunctuation(c))
Console.WriteLine(clean)
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.