devvoh/fixedwidth

FixedWidth is a library to read and generate fixed-width data files

0.2.6 2019-12-28 18:03 UTC

This package is auto-updated.

Last update: 2024-12-20 02:34:46 UTC


README

Latest Stable Version Latest Unstable Version License

Fixed-width is a simple library that can make working with fixed width file formats much easier. You define a Schema for a line, which can have a delimiter or not, and both the Reader and Generator will work with that Schema.

You can define valid characters, and the line or data will be rejected if it doesn't adhere to it. If a delimiter is found in a data value, it's rejected. If a line is rejected, the Reader will return null, which you can then interpret as you wish. If a dataItem is rejected, the Generator will return -- invalid data: data.

Requirements

  • PHP 5.6, PHP 7

Installation

Fixed-width can be installed by using Composer. Simply run:

composer require devvoh/fixedwidth

License

Fixed-width is open-sourced software licensed under the Unlicense.