TableHelper Class
Helper methods for parsing tables.
public static class TableHelperMethods
| Name | Description |
|---|---|
| ParseColumnHeader(StringSlice, char, TableColumnAlign?, int) | Parses a column header equivalent to the regexp: \s*:\s*[delimiterChar]+\s*:\s* |
| ParseColumnHeaderAuto(StringSlice, char, TableColumnAlign?) | Parses a column header equivalent to the regexp: \s*:\s*[delimiterChar]+\s*:\s* |
| ParseColumnHeaderDetect(StringSlice, char, TableColumnAlign?, int) | Parses a column header equivalent to the regexp: \s*:\s*[delimiterChar]+\s*:\s* |
ParseColumnHeader(StringSlice, char, TableColumnAlign?, int)
TableHelper.csParses a column header equivalent to the regexp: \s*:\s*[delimiterChar]+\s*:\s*
public static bool ParseColumnHeader(ref StringSlice slice, char delimiterChar, out TableColumnAlign? align, out int delimiterCount)Parameters
sliceStringSlice- The text slice.
delimiterCharchar- The delimiter character (either `-` or `=`).
alignTableColumnAlign?- The alignment of the column.
delimiterCountint- The number of delimiters.
Returns
bool true if parsing was successful
ParseColumnHeaderAuto(StringSlice, char, TableColumnAlign?)
TableHelper.csParses a column header equivalent to the regexp: \s*:\s*[delimiterChar]+\s*:\s*
public static bool ParseColumnHeaderAuto(ref StringSlice slice, out char delimiterChar, out TableColumnAlign? align)Parameters
sliceStringSlice- The text slice.
delimiterCharchar- The delimiter character (either `-` or `=`).
alignTableColumnAlign?- The alignment of the column.
Returns
bool true if parsing was successful
ParseColumnHeaderDetect(StringSlice, char, TableColumnAlign?, int)
TableHelper.csParses a column header equivalent to the regexp: \s*:\s*[delimiterChar]+\s*:\s*
public static bool ParseColumnHeaderDetect(ref StringSlice slice, ref char delimiterChar, out TableColumnAlign? align, out int delimiterCount)Parameters
sliceStringSlice- The text slice.
delimiterCharchar- The delimiter character (either `-` or `=`). If `\0`, it will detect the character (either `-` or `=`)
alignTableColumnAlign?- The alignment of the column.
delimiterCountint- The number of times
delimiterCharappeared in the column header.
Returns
bool true if parsing was successful