StringExtensionsWithDoubleQuotes Method
Returns a copy of the source string enclosed in double-quotes at the beginning and the end of the string.
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 WithDoubleQuotes(
this string input,
char leftDoubleQuote = '"',
char rightDoubleQuote = '"'
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function WithDoubleQuotes (
input As String,
Optional leftDoubleQuote As Char = """C,
Optional rightDoubleQuote As Char = """C
) As String
Dim input As String
Dim leftDoubleQuote As Char
Dim rightDoubleQuote As Char
Dim returnValue As String
returnValue = input.WithDoubleQuotes(leftDoubleQuote,
rightDoubleQuote)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static String^ WithDoubleQuotes(
String^ input,
wchar_t leftDoubleQuote = L'"',
wchar_t rightDoubleQuote = L'"'
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member WithDoubleQuotes :
input : string *
?leftDoubleQuote : char *
?rightDoubleQuote : char
(* Defaults:
let _leftDoubleQuote = defaultArg leftDoubleQuote '"'
let _rightDoubleQuote = defaultArg rightDoubleQuote '"'
*)
-> string
No code example is currently available or this language may not be supported.
- input String
-
The input String.
- leftDoubleQuote Char (Optional)
-
Optional. The character to use for the quote at the start of the string.
This value can be null.
Default value is: "
- rightDoubleQuote Char (Optional)
-
Optional. The character to use for the quote at the end of the string.
This value can be null.
Default value is: "
String
A copy of the source string enclosed in double-quotes at the beginning and the end of the 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 = "C:\Path With Spaces".WithDoubleQuotes()
MessageBox.Show(str)
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.