• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

a little more of "LEFT" function

LEGEND ,
Jul 06, 2006 Jul 06, 2006

Copy link to clipboard

Copied

Please help us polish the "left" function. For the search result, we are
showing only 400 characters in the page with #left(search_result, 400)# ...
function. The problem is the 400 count doesn't exactly cut the content by
words, so a lot of them are displayed as incomplete words. Is there a way
to prevent this?

YC


TOPICS
Advanced techniques

Views

269

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 06, 2006 Jul 06, 2006

Copy link to clipboard

Copied

After you do your Left( ) function, you're left with a space-delimited list. The code below will give you a whole word at the end.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 06, 2006 Jul 06, 2006

Copy link to clipboard

Copied

Thank you,
That's simple, but very smart.

YC

"jdeline" <jdeline@deline.com> wrote in message
news:e8jnhj$8ut$1@forums.macromedia.com...
> After you do your Left( ) function, you're left with a space-delimited
> list.
> The code below will give you a whole word at the end.
>
>
> <CFSET foo = Left(longText, 400)>
> <CFSET bar = ListDeleteAt(foo, ListLen(foo, " "), " ")>
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 06, 2006 Jul 06, 2006

Copy link to clipboard

Copied

LATEST
I like this FullLeft function...
http://www.cflib.org/udf.cfm?ID=329


--
Michael Evangelista
Evangelista Design / Evangelista Consulting, inc.
www.evangelista-web.com
Custom Small Business Website Solutions



"YC" <asppsa@hotmail.com> wrote in message news:e8jk32$4n2$1@forums.macromedia.com...
> Please help us polish the "left" function. For the search result, we are showing only 400 characters in the page with
> #left(search_result, 400)# ... function. The problem is the 400 count doesn't exactly cut the content by words, so a lot of
> them are displayed as incomplete words. Is there a way to prevent this?
>
> YC
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation