All Bundles
CsvTable
CSV table
Operations
New
Constructor
New(data:String)
Parameters
Name | Type | Description |
---|
data | String | CSV data with CRNL line endings |
Constructor
New(data:String, ending:String)
Parameters
Name | Type | Description |
---|
data | String | CSV data |
ending | String | line ending |
AppendColumn
Appends a column to the end of the table
method : public : AppendColumn(name:String) ~ Bool
Parameters
Name | Type | Description |
---|
name | String | name of column to add |
Return
Type | Description |
---|
Bool | ture if column was added, false otherwise |
ColumnValues
Get values for a given row
method : public : ColumnValues(index:Int) ~ CsvColumn
Parameters
Name | Type | Description |
---|
index | Int | column index |
Return
Type | Description |
---|
CsvColumn | values for the given row |
Get values for a given row
method : public : ColumnValues(name:String) ~ CsvColumn
Parameters
Name | Type | Description |
---|
name | String | column name |
Return
Type | Description |
---|
CsvColumn | values for the given row |
Contains
Searches a given column for like values
method : public : Contains(name:String, value:String) ~ CsvTable
Parameters
Name | Type | Description |
---|
name | String | column name |
value | String | value to search for |
Return
Type | Description |
---|
CsvTable | table of like results |
Searches a given column for like values
method : public : Contains(index:Int, value:String) ~ CsvTable
Parameters
Name | Type | Description |
---|
index | Int | column index |
value | String | value to search for |
Return
Type | Description |
---|
CsvTable | table of like results |
CountContains
Counts a column for like values
method : public : CountContains(name:String, value:String) ~ Int
Parameters
Name | Type | Description |
---|
name | String | column name |
value | String | value to search for |
Return
Type | Description |
---|
Int | number of occurrences |
Counts a column for like values
method : public : CountContains(index:Int, value:String) ~ Int
Parameters
Name | Type | Description |
---|
index | Int | column index |
value | String | value to search for |
Return
Type | Description |
---|
Int | number of occurrences |
CountMatches
Counts a column for matching values
method : public : CountMatches(name:String, value:String) ~ Int
Parameters
Name | Type | Description |
---|
name | String | column name |
value | String | value to search for |
Return
Type | Description |
---|
Int | number of occurrences |
Counts a column for matching values
method : public : CountMatches(index:Int, value:String) ~ Int
Parameters
Name | Type | Description |
---|
index | Int | column index |
value | String | value to search for |
Return
Type | Description |
---|
Int | number of occurrences |
Delete
Removes a row from the table
method : public : Delete(id:Int) ~ Bool
Parameters
Name | Type | Description |
---|
id | Int | row to delete |
Return
Type | Description |
---|
Bool | true if deleted false otherwise |
Get
Gets an indexed row
method : public : Get(index:Int) ~ CsvRow
Parameters
Name | Type | Description |
---|
index | Int | index |
Return
GetHeaders
Gets header names
method : public : GetHeaders() ~ CsvRow
Return
Type | Description |
---|
CsvRow | header names |
GetRowId
Gets row name
method : public : GetRowId(name:String) ~ Int
Parameters
Name | Type | Description |
---|
name | String | name |
Return
Type | Description |
---|
Int | row index |
IsParsed
Returns rather the file has been successfully parsed
method : public : IsParsed() ~ Bool
Return
Type | Description |
---|
Bool | true if successfully parsed, false otherwise |
Matches
Searches a given column for matching values
method : public : Matches(name:String, value:String) ~ CsvTable
Parameters
Name | Type | Description |
---|
name | String | column name |
value | String | value to search for |
Return
Type | Description |
---|
CsvTable | table of matching results |
Searches a given column for matching values
method : public : Matches(index:Int, value:String) ~ CsvTable
Parameters
Name | Type | Description |
---|
index | Int | column index |
value | String | value to search for |
Return
Type | Description |
---|
CsvTable | table of matching results |
RowSize
Gets the size of rows
method : public : RowSize() ~ Int
Return
Type | Description |
---|
Int | row size |
Size
Gets the number of rows
method : public : Size() ~ Int
Return
Type | Description |
---|
Int | number of rows |
ToJson
Formats the table into a JSON object string
method : public : ToJson() ~ String
Return
Type | Description |
---|
String | JSON object string |
ToString
Formats the table into a string
method : public : ToString() ~ String
Return
Type | Description |
---|
String | string representation of the table |
UniqueColumnValues
Get unique values for a given row
method : public : UniqueColumnValues(name:String) ~ CsvColumn
Parameters
Name | Type | Description |
---|
name | String | column name |
Return
Type | Description |
---|
CsvColumn | unique values for the given row |
Get unique values for a given row
method : public : UniqueColumnValues(index:Int) ~ CsvColumn
Parameters
Name | Type | Description |
---|
index | Int | column index |
Return
Type | Description |
---|
CsvColumn | unique values for the given row |