Showing posts with label instr. Show all posts
Showing posts with label instr. Show all posts

Tuesday, 2 October 2012

ASP: the InStr function

   


One of the most used functions in ASP is InStr.
In this short article we are going to see how to use it.

The Syntax
The InStr function has the following syntax:
InStr([startOfStr,]stringSearched,search[,compare])
where:
startOfStr is optional and it specifies where the search will begin. By default is set to1 (first character of the string). It is required when compare is used.

Monday, 13 February 2012

ASP: convert a string into a link

   


If you often visit social networks or, generally speaking, discussion web sites, you surely have noticed that sometimes when you insert a message or a post, every possible link is automatically recognised and "transformed" into a clickable link. How is it done?

With ASP we can manipulate a given string, find a possible link and change it.