Namespaces | |
| Memory | |
Classes | |
| class | CsvConfig |
| Parses CSV file. More... | |
| struct | partial_csv_t |
| Set of parameters passed to PartialCsvParser::PartialCsvParser(). More... | |
| class | PartialCsvParser |
| Parser to split CSV into rows and columns. More... | |
| class | PCPCsvError |
| Thrown when invalid CSV is parsed. More... | |
| class | PCPError |
| Runtime error. More... | |
Typedefs | |
| typedef struct PCP::partial_csv_t | partial_csv_t |
| Set of parameters passed to PartialCsvParser::PartialCsvParser(). More... | |
Functions | |
| size_t | _filesize (int opened_fd) throw (PCPError) |
| void | _get_current_line (const char *const text, size_t text_length_byte, size_t current_pos, char line_terminator, const char **line, size_t *line_length_byte) |
Find a line including specified current_pos. More... | |
| std::vector< std::string > | _split (const char *const str, size_t len, char delimiter) |
| typedef struct PCP::partial_csv_t PCP::partial_csv_t |
Set of parameters passed to PartialCsvParser::PartialCsvParser().
|
inline | ||||||||||||||
|
inline |
Find a line including specified current_pos.
| [in] | text | Original text to find a line from. |
| [in] | text_length_byte | Byte length of the original text. |
| [in] | current_pos | Current position taking 0 ~ (text_length - 1). |
| [in] | line_terminator | Character to terminate a line. |
| [out] | line | Pointer of start of the current line will be output. |
| [out] | line_length_byte | Byte length of current line (not including line terminator) will be output. |
\n aaaaaaaaaaa \n bbbbbbbbbbbbb \n cccccccccc \n
^ ^ ^
(1) (2)(3)
If current_pos is at between (1) and (2), line will point at (1). If current_pos is at (3), line will also point at (1).
\n ddddddddd \n eeeeeeeeeee \0
^ ^
(1) (2)
Consider null character. If current_pos is at between (1) and (2), line will point at (1).
|
inline |
1.8.7