ChopLastWord Function
page 1 of 3
Published: 02 Nov 2003
Abstract
Sometimes you need to limit the length of a string by truncating it, but you don't want to leave a fraction of a word behind. Using this VBScript function, you can limit the length of a string while retaining only complete words.
by Topher Jentoft
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 15759/ 128
Article Contents:

Introduction
For the front page of the aspalliance.com site, we were trying to show a substring of article descriptions truncated after so many characters and then followed by "...more!" as a link for people to click to read the full article. Since I only wrote the thing using the VBScript "Left" function, it was indiscriminately cutting off the description in mid-word. This didn't really bother me too much, but it wasn't ideal. Well, it bothered one of our readers enough for them to do something about it, and so they sent in a function to truncate the description, but to ensure that no words are cut off.

View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 4 and 8 and type the answer here:

User Comments

Title: Bothe Great Solutions   
Name: David Johndrow
Date: 2/2/2007 12:15:59 PM
Comment:
Thanks, very fast and easy to implement.
Title: satish   
Name: satish
Date: 5/21/2005 2:29:04 AM
Comment:
thank you
Title: ChopLastWord Function   
Name: ChopLastWord Function
Date: 7/9/2004 7:32:41 PM
Comment:
Thank you so much for this!

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 8/30/2008 11:33:27 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search