Re: Formatting Text for Email/Text Files

2001-09-04 Thread tom muck
Here's a function for CF 5: call it like cfset mybody = makeNiceEmail(mybody,70) cfscript function makeNiceEmail(string, theLength) { CRLF=chr(13); for (i=theLength-1;i LTE Len(string);i=i+theLength){ string = Insert(CRLF,string,i); } return string; } /cfscript tom

RE: Formatting Text for Email/Text Files

2001-09-04 Thread Zac Belado
call it like cfset mybody = makeNiceEmail(mybody,70) cfscript function makeNiceEmail(string, theLength) { CRLF=chr(13); for (i=theLength-1;i LTE Len(string);i=i+theLength){ string = Insert(CRLF,string,i); } return string; } /cfscript CRLF chould be chr(13) chr(10) shouldn't

RE: Formatting Text for Email/Text Files

2001-09-04 Thread Dennis Powers
long, which is not likely. Best regards, Dennis Powers UXB Internet (203)879-2844 http://www.uxbinfo.com/ -Original Message- From: tom muck [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 12:15 PM To: CF-Talk Subject: Re: Formatting Text for Email/Text Files Here's

Re: Formatting Text for Email/Text Files

2001-09-04 Thread Howie Hamlin
PROTECTED] Sent: Tuesday, September 04, 2001 12:42 PM Subject: RE: Formatting Text for Email/Text Files Tom, Thanks for the idea, but I am stuck with CF 4.0.1 at the moment. However won't your function just insert at the 70th character regardless of whether is falls within a word? What I am

Re: Formatting Text for Email/Text Files

2001-09-04 Thread tom muck
True, I didn't read your post clearly. I'm using this for email attachments. To do what you need to do is a little or a lot more difficult. You can use list functions to separate the words at the space, adding words until you are up to 70 characters, or choose an arbitrary length less than

RE: Formatting Text for Email/Text Files

2001-09-04 Thread Dennis Powers
Well, I decided to dig into the project for a friendly word wrap tag and had just fleshed out what I needed to do, when I said to myself: self (it's already been a long week) check out the tag gallery. Low and behold Mr. Joe Cheng of Allaire Corp. wrote a CF_WordWrap tag back in 9/18/97. it is