Delimit.FixedWidth.Reader (delimit v0.4.2)
View SourceFunctions for reading fixed-width data from files or strings.
This module handles parsing of fixed-width format data where each field occupies a specific number of characters per line.
Summary
Functions
Reads fixed-width data from a file.
Reads fixed-width data from a string.
Streams fixed-width data from a file.
Functions
@spec read_file(Delimit.Schema.t(), Path.t(), Keyword.t()) :: [struct()]
Reads fixed-width data from a file.
Parameters
schema- The schema definitionpath- Path to the fixed-width fileopts- Read options
Returns
- List of structs with parsed data based on schema
@spec read_string(Delimit.Schema.t(), binary(), Keyword.t()) :: [struct()]
Reads fixed-width data from a string.
Parameters
schema- The schema definitionstring- String containing fixed-width dataopts- Read options
Returns
- List of structs with parsed data based on schema
@spec stream_file(Delimit.Schema.t(), Path.t(), Keyword.t()) :: Enumerable.t()
Streams fixed-width data from a file.
Parameters
schema- The schema definitionpath- Path to the fixed-width fileopts- Read options
Returns
- Stream of structs with parsed data based on schema