Class EnumerableToString
Extension method equivalents to static methods from String that apply to enumerables.
Inherited Members
Namespace: Hgk.Zero.Strings.Linq
Assembly: Hgk.Zero.Strings.dll
Syntax
public static class EnumerableToString
Methods
| Improve this Doc View SourceConcatToString(IEnumerable<String>)
Concatenates the elements of a string sequence.
Declaration
public static string ConcatToString(this IEnumerable<string> values)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | values | The string values to concatenate. |
Returns
| Type | Description |
|---|---|
| String | The concatenation of the values in |
Remarks
This method returns the result of calling Concat(IEnumerable<String>).
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
ConcatToString(Object[])
Concatenates the string representations of the elements of an array.
Declaration
public static string ConcatToString(this object[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| Object[] | values | The values to concatenate. |
Returns
| Type | Description |
|---|---|
| String | The concatenation of the string representations of the values in |
Remarks
This method returns the result of calling Concat(Object[]).
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
ConcatToString(String[])
Concatenates the elements of a string array.
Declaration
public static string ConcatToString(this string[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| String[] | values | The string values to concatenate. |
Returns
| Type | Description |
|---|---|
| String | The concatenation of the values in |
Remarks
This method returns the result of calling Concat(String[]).
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
ConcatToString<T>(IEnumerable<T>)
Concatenates the string representations of the elements of a sequence.
Declaration
public static string ConcatToString<T>(this IEnumerable<T> values)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | values | The values to concatenate. |
Returns
| Type | Description |
|---|---|
| String | The concatenation of the string representations of the values in |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the members of |
Remarks
This method returns the result of calling Concat<T>(IEnumerable<T>).
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
JoinToString(IEnumerable<String>, String)
Concatenates the elements of a string sequence using the specified string as a separator.
Declaration
public static string JoinToString(this IEnumerable<string> values, string separator)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | values | The string values to concatenate. |
| String | separator | A string to use as a separator. (If null, an empty string is used.) |
Returns
| Type | Description |
|---|---|
| String | The concatenation of the values in |
Remarks
This method returns the result of calling Join(String, IEnumerable<String>).
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
JoinToString(Object[], String)
Concatenates the string representation of the elements of an array using the specified string as a separator.
Declaration
public static string JoinToString(this object[] values, string separator)
Parameters
| Type | Name | Description |
|---|---|---|
| Object[] | values | The values to concatenate. |
| String | separator | A string to use as a separator. (If null, an empty string is used.) |
Returns
| Type | Description |
|---|---|
| String | The concatenation of the string representations of the values in |
Remarks
This method returns the result of calling Join(String, Object[]).
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
JoinToString(String[], Int32, Int32, String)
Concatenates the specified elements of a string array using the specified string as a separator.
Declaration
public static string JoinToString(this string[] values, int startIndex, int count, string separator)
Parameters
| Type | Name | Description |
|---|---|---|
| String[] | values | An array containing strings to concatenate. |
| Int32 | startIndex | The first index of |
| Int32 | count | The number of elements of |
| String | separator | A string to use as a separator. (If null, an empty string is used.) |
Returns
| Type | Description |
|---|---|
| String | The concatenation of the values in the specified range of |
Remarks
This method returns the result of calling Join(String, String[], Int32, Int32).
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentOutOfRangeException |
|
JoinToString(String[], String)
Concatenates the elements of a string array using the specified string as a separator.
Declaration
public static string JoinToString(this string[] values, string separator)
Parameters
| Type | Name | Description |
|---|---|---|
| String[] | values | The string values to concatenate. |
| String | separator | A string to use as a separator. (If null, an empty string is used.) |
Returns
| Type | Description |
|---|---|
| String | The concatenation of the values in |
Remarks
This method returns the result of calling Join(String, String[]).
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
JoinToString<T>(IEnumerable<T>, String)
Concatenates the string representation of the elements of a sequence using the specified string as a separator.
Declaration
public static string JoinToString<T>(this IEnumerable<T> values, string separator)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | values | The values to concatenate. |
| String | separator | A string to use as a separator. (If null, an empty string is used.) |
Returns
| Type | Description |
|---|---|
| String | The concatenation of the string representations of the values in |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the members of |
Remarks
This method returns the result of calling Join<T>(String, IEnumerable<T>).
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|