Table of Contents

Class DelimitedString

Namespace
Cuemon
Assembly
Cuemon.Core.dll

Provides a set of static methods to convert a sequence into a delimited string and break a delimited string into substrings.

public static class DelimitedString
Inheritance
Object
DelimitedString

Methods

Create<T>(IEnumerable<T>, Action<DelimitedStringOptions<T>>)

Creates a delimited string representation from the specified source.

public static string Create<T>(IEnumerable<T> source, Action<DelimitedStringOptions<T>> setup = null)

Parameters

source IEnumerable<T>

The System.Collections.Generic.IEnumerable<T> to convert.

setup Action<DelimitedStringOptions<T>>

The DelimitedStringOptions<T> which may be configured.

Returns

String

A System.String of delimited values that is a result of source.

Type Parameters

T

Exceptions

System.ArgumentNullException

source cannot be null.

Split(String, Action<DelimitedStringOptions>)

Returns a string[] that contain the substrings of value delimited by a Delimiter that may be quoted by Qualifier.

public static string[] Split(string value, Action<DelimitedStringOptions> setup = null)

Parameters

value String

The value containing substrings and delimiters.

setup Action<DelimitedStringOptions>

The DelimitedStringOptions which may be configured.

Returns

String[]

A string[] that contain the substrings of value delimited by a Delimiter and optionally surrounded within Qualifier.

Remarks

Exceptions

System.InvalidOperationException

An error occurred while splitting value into substrings separated by Delimiter and quoted with Qualifier. This is typically related to data corruption, eg. a field has not been properly closed with the Qualifier specified.