Module sintra_6_2_1_0-sintra.flc_decoder
Decode data in a fixed-length columns format.
Functions
| decode () | Decode data according to the configuration. |
| config (params) | Configure the process. |
| new (o) | Create a new object. |
Functions
- decode ()
-
Decode data according to the configuration.
Returns:
-
Table (array) of lines filtered by the callback function.
- config (params)
-
Configure the process.
Parameters:
- params Table with the following entries:
- filename String with the name of the file.
- content String with the text to be processed (the content of the file).
- columns Table (array) describing data columns, which can be a simple number representing the quantity of characters, or a table with the entries `size`, indicating the quantity of characters, and `name`, indicating the corresponding key used to store the value.
- callback Function which will be called to process each line of data, represented by a table doubly indexed: numbers and names; this function should return the corresponding value of each line to be added to the resulting array returned by :decode().
- params Table with the following entries:
- new (o)
-
Create a new object.
Parameters:
- o