Kanzi 3.9.10
CsvUtilities Class Reference

Static utility class for CSV import and export related generic functionality. More...

Static Public Member Functions

static string AddQuotesToText (string text)
 Adds quotes to the given text.
 
static string TrimQuotes (string text)
 Method for trimming quotes in the beginning and end of the string.
 

Static Public Attributes

static readonly char DEFAULT_DELIMITER
 The default delimiter, comma by default.
 
static readonly char QUOTE = '\"'
 The character used for quiting strings in CSV.
 
static readonly string SEPARATOR_HEADER = "sep="
 The separator header key for the CSV file.
 

Detailed Description

Static utility class for CSV import and export related generic functionality.

Member Function Documentation

◆ AddQuotesToText()

static string AddQuotesToText ( string text)
inlinestatic

Adds quotes to the given text.

Parameters
textThe text.
Returns

◆ TrimQuotes()

static string TrimQuotes ( string text)
inlinestatic

Method for trimming quotes in the beginning and end of the string.

Parameters
textThe text.
Returns

Member Data Documentation

◆ DEFAULT_DELIMITER

readonly char DEFAULT_DELIMITER
static
Initial value:
=
CultureInfo.CurrentCulture.TextInfo.ListSeparator.Length == 1
? CultureInfo.CurrentCulture.TextInfo.ListSeparator.First()
: ','

The default delimiter, comma by default.