This may sound like an off-topic answer, but wouldn't that be the job of some CSS declaration? Some combination of overflow and white-space could be the answer to your problem.
Just a thought...
In reply to Re: Text width metrics/heuristics
by Fang
in thread Text width metrics/heuristics
by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |