@accounter/shaam-uniform-format-generator
Version:
Fully typed application that generates, parses, and validates SHAAM uniform format tax reports (INI.TXT and BKMVDATA.TXT).
15 lines (14 loc) • 360 B
JavaScript
/**
* Fixed-width decoding utilities
*/
/**
* Decodes a fixed-width string value
*
* @param line - The line to decode from
* @param start - Start position (0-based)
* @param length - Field length
* @returns Decoded and trimmed value
*/
export function decodeFixedWidth(line, start, length) {
return line.substring(start, start + length).trim();
}