FA-95992 / Postal address normalization / Member archive
Address label line wrapper: the joining space is not counted · case 02
A line one character longer than the label width is produced.
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 |
|---|---|---|---|
| one character over once the separator counts | {"lines": ["ATTN ZORBLETO"], "overflow": false} | {"lines": ["ATTN", "ZORBLETO"], "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 ↗