For variable pitch fonts, the results would depend on the font used. I've built a custom solution once for Postscript fonts, using Font::AFM, but I don't know a similar, more generic (and better tested) module on CPAN. In short, what is needed, is to replace the simpleminded test for string length, with a test based upon stringwidth() of a substring, calculating the physical width of a text when printed.
In reply to Re: Insert breaklines into string
by bart
in thread Insert breaklines into string
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |