StringExtensionsReplaceAll(String, IEnumerableChar, Char) Method
Returns a new string in which all occurrences of the specified characters in the current instance
are replaced with another specified character.
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 ReplaceAll(
this string sender,
IEnumerable<char> findWhat,
char replaceWith
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ReplaceAll (
sender As String,
findWhat As IEnumerable(Of Char),
replaceWith As Char
) As String
Dim sender As String
Dim findWhat As IEnumerable(Of Char)
Dim replaceWith As Char
Dim returnValue As String
returnValue = sender.ReplaceAll(findWhat,
replaceWith)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static String^ ReplaceAll(
String^ sender,
IEnumerable<wchar_t>^ findWhat,
wchar_t replaceWith
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ReplaceAll :
sender : string *
findWhat : IEnumerable<char> *
replaceWith : char -> string
No code example is currently available or this language may not be supported.
- sender String
-
The source String.
- findWhat IEnumerableChar
-
A collection of characters to match.
- replaceWith Char
-
The character to replace with.
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!".ReplaceAll({"o"c, " "c, "!"c}, "_"c, StringComparison.OrdinalIgnoreCase)
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.
ArgumentNullException
|
findWhat
|