Showing posts with label excerpt. Show all posts
Showing posts with label excerpt. Show all posts

Monday, 24 October 2011

ASP: how to create an excerpt from a text string

   


In the following short article, we are going to build a function which will extract an excerpt from a text string, using classic ASP. The function could be used in blogs, or in general, when we need to display just a part of an article, a news or any long text (maybe providing a link to the complete piece of text).

The function is very simple, but it has a little trick in it: it won't cut a word. Basically we are going to benefit from the InStrRev VBScript function.

Let's see the how we do it.