Re: Limit the output of words to 300 chars <---- it even says chars in the subject line

2000-10-29 Thread pan

ARRRGH !

Too late 

he wrote "limit to 300 chars"
 NOT 300 words

Pan - abashed, no excuses







Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: Limit the output of words to 300 chars

2000-10-29 Thread pan


From: "Nathan Stanford" <[EMAIL PROTECTED]>

> 
> How can I Limit the output of words to 300 chars but don't cut off a word in
> the middle?
> 

In psuedo code --

target
define word
ListInsertAt 300th word some_unused_char_as_delimiter
goal = ListFirst(target)

in CF ( not guaranteed)
this is verbose and explicit, there should be a regex
that can do the same in one step (Rick Osborne??)














 


 







 



redefine word


rareChar selection should be informed by awareness of
language used in txt and by general knowledge of context
I.E. chr(135) will be likely in highly footnoted tracts
from academic types (especially history majors  :)  ).

Pan - the one and only Baroque programmer

  


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: CHILL! Re: Limit the output of words to 300 chars

2000-10-29 Thread BORKMAN Lee

Down here, we have what we refer to lovingly as "the Ugly Australian".  It's
a much-valued tradition that Andrew is trying his best to perpetuate.  All
power to him, I say.

Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]

Hey Andrew, Jump off that BIG horse... I'm SURE, and I know there are those
whom have more knowledge then yourself. But do you see them crashing you
development when you don't answer question correctly.So take a chill no
one calling you a non programmer.


IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Limit the output of words to 300 chars

2000-10-29 Thread Scott, Andrew

*LOL*

regards

Andrew Scott
Senior Cold Fusion Application Developer
ANZ eCommerce Centre
* Ph 9273 0693  
* [EMAIL PROTECTED]


-Original Message-
From: Stephen M. Aylor [mailto:[EMAIL PROTECTED]]
Sent: 30 October 2000 15:05
To: CF-Talk
Subject: Re: Limit the output of words to 300 chars



> but hey I guess CF attracts a lot of non
> programmers then

> Andrew Scott
> Senior Cold Fusion Application Developer

Your just now realizing this?

Steve Aylor
Basic Dude


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



CHILL! Re: Limit the output of words to 300 chars

2000-10-29 Thread Brian bouldernet

Hey Andrew, Jump off that BIG horse... I'm SURE, and I know there are those
whom have more knowledge then yourself. But do you see them crashing you
development when you don't answer question correctly.So take a chill no
one calling you a non programmer.

HISTORY:
http://listserver.tved.net.au/pipermail/cfaussie/2000-August/000283.html
http://www.allaire.com/Products/ColdFusion/features/CF45ServerFeatureMatrix.
pdf
-Brian

- Original Message -
From: Scott, Andrew <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Sunday, October 29, 2000 9:06 PM
Subject: RE: Limit the output of words to 300 chars


> *s* You are welcome to your comments, as I am welcome to mine!
>
> But I just wanted to say that this is an easy thing that even the most
basic
> programers can figure out... but hey I guess CF attracts a lot of non
> programmers then
>
>
> regards
>
> Andrew Scott
> Senior Cold Fusion Application Developer
>
>
>
> -Original Message-
> From: Stephen M. Aylor [mailto:[EMAIL PROTECTED]]
> Sent: 30 October 2000 14:39
> To: CF-Talk
> Subject: Re: Limit the output of words to 300 chars
>
>
>
> Andrew,
>
> Thanks for posting a possible solution but why bother if youre gonna
> belittle?
>
> STFW your a "seasoned professional" - lots of people are here to
learn.
>
> Lay off the cafe' and keep your arrogance to your small self.
>
> Steve
>
> - Original Message -
> > on 10/30/00 1:35 PM, Scott, Andrew at [EMAIL PROTECTED] wrote:
> >
> > > Easy do a left(string,300) then reverse the string and find the first
> space
> > > get the position and then do a mid on that? Some of these quesations
are
> > > very basic programming skills guys!
>
>
>
> --
--
> 
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a
> message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
> --
--
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
>


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Limit the output of words to 300 chars

2000-10-29 Thread Nathan Stanford

I simply stated I didn't have the time to figure it out and since it was
sooo simple could someone point me in the right direction... by the way
there are plenty of beginners and advanced people on this list...



#reverse(outvar)#

Here is my final bit of code for all of the beginners and those of us who
are too busy to have ALL of the answers.

:)

Nathan Stanford
PS. I will be at the cf_underground on the expert panel so sorry to have
bothered you.





-Original Message-
From: Scott, Andrew [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 29, 2000 10:07 PM
To: CF-Talk
Subject: RE: Limit the output of words to 300 chars


*s* You are welcome to your comments, as I am welcome to mine!

But I just wanted to say that this is an easy thing that even the most basic
programers can figure out... but hey I guess CF attracts a lot of non
programmers then


regards

Andrew Scott
Senior Cold Fusion Application Developer



-Original Message-
From: Stephen M. Aylor [mailto:[EMAIL PROTECTED]]
Sent: 30 October 2000 14:39
To: CF-Talk
Subject: Re: Limit the output of words to 300 chars



Andrew,

Thanks for posting a possible solution but why bother if youre gonna
belittle?

STFW your a "seasoned professional" - lots of people are here to learn.

Lay off the cafe' and keep your arrogance to your small self.

Steve

- Original Message -
> on 10/30/00 1:35 PM, Scott, Andrew at [EMAIL PROTECTED] wrote:
>
> > Easy do a left(string,300) then reverse the string and find the first
space
> > get the position and then do a mid on that? Some of these quesations are
> > very basic programming skills guys!





Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Limit the output of words to 300 chars

2000-10-29 Thread Bob Silverberg

I don't know if this will qualify as either neat or elegant, but I believe
that it will work.  If not, please forgive me, I haven't tested it
exhaustively ;)









Note: test1 is the string we are truncating, final is the result

Bob


-Original Message-
From: BORKMAN Lee [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 29, 2000 10:51 PM
To: CF-Talk
Subject: RE: Limit the output of words to 300 chars


Please Andrew.  Lay off the cheap sentimentality.  All this lovin' is
getting a little mushy.

btw, your solution will get rid of the last word in the 300 characters, even
if the word was complete, which may not be exactly what you want. Sometimes
basic is not so basic.

Take a look at char 301.  If it's whitespace, or maybe even punctuation, you
can leave your 300 chars alone.  And that's just the start of the fun.

Neatest, most elegant solution to this near-but-not-quite trivial problem
wins a beautiful set of steak knives.

Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork


-Original Message-
From: Scott, Andrew [mailto:[EMAIL PROTECTED]]

Easy do a left(string,300) then reverse the string and find the first space
get the position and then do a mid on that? Some of these quesations are
very basic programming skills guys!

regards
Andrew Scott

-Original Message-
From: Nathan Stanford [mailto:[EMAIL PROTECTED]]

How can I Limit the output of words to 300 chars but don't cut off a word in
the middle?


IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: Limit the output of words to 300 chars

2000-10-29 Thread Stephen M. Aylor


> but hey I guess CF attracts a lot of non
> programmers then

> Andrew Scott
> Senior Cold Fusion Application Developer

Your just now realizing this?

Steve Aylor
Basic Dude




Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Limit the output of words to 300 chars

2000-10-29 Thread Scott, Andrew

Well thats the price you pay, for example you would need to expand the
concept a bit more. Does the last position (301) contain a space, then you
wouldn't need to go back any further, or is it a comma or a full stop. You
see if you think about it then the solution is simple!

There are no hard and fast methods, its what you program at the time for
what you need. In my case when I first did something like this, it didn't
matter it was words upto 300 chars. No if you want to throw more conditions
on top of this then you can do what you need!


regards

Andrew Scott
Senior Cold Fusion Application Developer
ANZ eCommerce Centre
* Ph 9273 0693  
* [EMAIL PROTECTED]


-Original Message-
From: BORKMAN Lee [mailto:[EMAIL PROTECTED]]
Sent: 30 October 2000 14:51
To: CF-Talk
Subject: RE: Limit the output of words to 300 chars


Please Andrew.  Lay off the cheap sentimentality.  All this lovin' is
getting a little mushy.

btw, your solution will get rid of the last word in the 300 characters, even
if the word was complete, which may not be exactly what you want. Sometimes
basic is not so basic.

Take a look at char 301.  If it's whitespace, or maybe even punctuation, you
can leave your 300 chars alone.  And that's just the start of the fun.

Neatest, most elegant solution to this near-but-not-quite trivial problem
wins a beautiful set of steak knives.

Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork


-Original Message-
From: Scott, Andrew [mailto:[EMAIL PROTECTED]]

Easy do a left(string,300) then reverse the string and find the first space
get the position and then do a mid on that? Some of these quesations are
very basic programming skills guys!

regards
Andrew Scott

-Original Message-
From: Nathan Stanford [mailto:[EMAIL PROTECTED]]

How can I Limit the output of words to 300 chars but don't cut off a word in
the middle?


IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Limit the output of words to 300 chars

2000-10-29 Thread Scott, Andrew

*s* You are welcome to your comments, as I am welcome to mine!

But I just wanted to say that this is an easy thing that even the most basic
programers can figure out... but hey I guess CF attracts a lot of non
programmers then


regards

Andrew Scott
Senior Cold Fusion Application Developer



-Original Message-
From: Stephen M. Aylor [mailto:[EMAIL PROTECTED]]
Sent: 30 October 2000 14:39
To: CF-Talk
Subject: Re: Limit the output of words to 300 chars



Andrew,

Thanks for posting a possible solution but why bother if youre gonna
belittle?

STFW your a "seasoned professional" - lots of people are here to learn.

Lay off the cafe' and keep your arrogance to your small self.

Steve

- Original Message -
> on 10/30/00 1:35 PM, Scott, Andrew at [EMAIL PROTECTED] wrote:
>
> > Easy do a left(string,300) then reverse the string and find the first
space
> > get the position and then do a mid on that? Some of these quesations are
> > very basic programming skills guys!





Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Limit the output of words to 300 chars

2000-10-29 Thread BORKMAN Lee

Please Andrew.  Lay off the cheap sentimentality.  All this lovin' is
getting a little mushy.

btw, your solution will get rid of the last word in the 300 characters, even
if the word was complete, which may not be exactly what you want. Sometimes
basic is not so basic.

Take a look at char 301.  If it's whitespace, or maybe even punctuation, you
can leave your 300 chars alone.  And that's just the start of the fun.

Neatest, most elegant solution to this near-but-not-quite trivial problem
wins a beautiful set of steak knives.

Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork


-Original Message-
From: Scott, Andrew [mailto:[EMAIL PROTECTED]]

Easy do a left(string,300) then reverse the string and find the first space
get the position and then do a mid on that? Some of these quesations are
very basic programming skills guys!

regards
Andrew Scott

-Original Message-
From: Nathan Stanford [mailto:[EMAIL PROTECTED]]

How can I Limit the output of words to 300 chars but don't cut off a word in
the middle?


IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: Limit the output of words to 300 chars

2000-10-29 Thread Stephen M. Aylor


Andrew,

Thanks for posting a possible solution but why bother if youre gonna
belittle?

STFW your a "seasoned professional" - lots of people are here to learn.

Lay off the cafe' and keep your arrogance to your small self.

Steve

- Original Message -
> on 10/30/00 1:35 PM, Scott, Andrew at [EMAIL PROTECTED] wrote:
>
> > Easy do a left(string,300) then reverse the string and find the first
space
> > get the position and then do a mid on that? Some of these quesations are
> > very basic programming skills guys!




Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: Limit the output of words to 300 chars

2000-10-29 Thread Rob Keniger

on 10/30/00 1:35 PM, Scott, Andrew at [EMAIL PROTECTED] wrote:

> Easy do a left(string,300) then reverse the string and find the first space
> get the position and then do a mid on that? Some of these quesations are
> very basic programming skills guys!

Some of these posters are very intolerant...

-- 

Rob Keniger

big bang solutions





Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Limit the output of words to 300 chars

2000-10-29 Thread Scott, Andrew

Easy do a left(string,300) then reverse the string and find the first space
get the position and then do a mid on that? Some of these quesations are
very basic programming skills guys!

regards

Andrew Scott
Senior Cold Fusion Application Developer
ANZ eCommerce Centre
* Ph 9273 0693  
* [EMAIL PROTECTED]


-Original Message-
From: Nathan Stanford [mailto:[EMAIL PROTECTED]]
Sent: 30 October 2000 14:29
To: CF-Talk
Subject: Limit the output of words to 300 chars



How can I Limit the output of words to 300 chars but don't cut off a word in
the middle?

Thanks,
Nathan

P.S. I know I should know but I don't have time to find it can someone help
me..

see you all at the Conf in DC!!




Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]