StringAlgorithmsJoinQuoted Method (StringBuilder, Char, Char, IEnumerableString) |
Concatenates the members of a collection, using the specified separator between each member, and surrounding each non-null member by the specified quote char,
appending to StringBuilder
Namespace:
DHI.Mike1D.Generic
Assembly:
DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax public static void JoinQuoted(
this StringBuilder builder,
char separator,
char quotechar,
IEnumerable<string> values
)
<ExtensionAttribute>
Public Shared Sub JoinQuoted (
builder As StringBuilder,
separator As Char,
quotechar As Char,
values As IEnumerable(Of String)
)
public:
[ExtensionAttribute]
static void JoinQuoted(
StringBuilder^ builder,
wchar_t separator,
wchar_t quotechar,
IEnumerable<String^>^ values
)
Parameters
- builder
- Type: System.TextStringBuilder
StringBuilder to use for concatenation - separator
- Type: SystemChar
The string to use as a separator.separator is included in the returned string only if values has more than one element. - quotechar
- Type: SystemChar
The quote char is surrounding each non-null value. If a value is containing the quote char, it is escaped by a double quote char - values
- Type: System.Collections.GenericIEnumerableString
Values to concatenate
Return Value
Type:
A string that consists of the members of values surruonded by quotechar and delimited by the separator char. If values has no members, the method returns String.Empty.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
StringBuilder. 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