FA-96014 / Postal address normalization / Member archive
Address label line wrapper: the last line is never emitted · case 04
The final words of every label disappear.
Case contract
Input [text, width, max_lines]. Words are whitespace-separated. A word longer than width first flushes the current line, then is emitted in width-sized chunks, the final remainder continuing as an ordinary word. Words join with single spaces while the line length stays <= width. Return {"lines": the first max_lines lines, "overflow": whether more than max_lines lines were needed}.
Why this case matters
Label printers and carrier manifests cap line length and line count; an off-by-one silently truncates part of the address.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| exact fit including the separator | {"lines": [], "overflow": false} | {"lines": ["ATTN ZORBLETON"], "overflow": false} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗