|
|
“RE: Updated the string-wrapping functions” |
|||
| From: | Seth Dillingham | In Response To: | 5424 Re: Updated the string-wrapping functions |
| Date Posted: | Tuesday, March 21, 2006 6:40:17 PM | Replies: | 1 |
| Enclosures: | None. | ||
On 3/21/06, Duncan Smeed said:
>Not sure if the following is a bug or a feature but I note that BBEdit >(and Mailsmith) and your wrap functions give different results as follows:
I consider it a 'feature'.
To me, "wrap to 72 characters" means that the maximum length of any line should be 72 characters. That is, no line over 72 charcters.
BBEdit and Mailsmith (which are built on the same text engine) always wrap to one character less than whatever you put in. You can count the results, it's always the same: create a line with exactly 72 characters, and tell BBEdit or Mailsmith to wrap it to 72 characters, and the last word will be bumped down to the next line. If you rewrap to 73 charcaters, it won't be.
I thought that perhaps it was counting the line-ending character (a stretch, but that was my best guess). However, if you switch to DOS line endings (which uses two characters: cr + lf), the behavior doesn't change.
Duncan, thank you for testing this! I really appreciate it.
Seth
There are no trackbacks.
|
TruerWords
is Seth Dillingham's personal web site. More than the sum of my parts. |