keawade / fixed-width-parser

A node module for parsing data to and from fixed width string formats.
MIT License
7 stars 3 forks source link

Option to control string trimming #15

Open dev-juju opened 3 years ago

dev-juju commented 3 years ago

Is your feature request related to a problem? Please describe. Strings are always left trimmed? Also strings are never right trimmed? Seems like a very narrow implementation. Trimming should be optional.

Example input: "00123 -- vh4 ll9 whu " if my start is 6 or 7 for example,
the returned string is: "-- vh4 ll9 whu " but expected string is: " -- vh4 ll9 whu "

Describe the solution you'd like Can you add a config option to specify whether strings should be trimmed. We should be able to specify if we want left trimming, right trimming, none or both.

jtarvainen commented 1 year ago

+1 for this request