Right ASP String Function

Right ASP String Function
Right is a commonly used ASP function that allows you to copy characters from the right side of a string. It takes in two parameters:

* The string variable to operate on
* An integer representing how many characters to copy

The original string variable is not altered.

Let's say you have a string called UserName which is equal to "Lisa Shea". Now let's say you just want the Shea part, to put into a new field called LastName. Using the InStr function you determine that the last name is 4 characters long. You would then use Right like this:

LastName = Right(UserName, 4)

The result is that LastName would be equal to "Shea".

ASP String Functions

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.




RSS
Related Articles
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map





Content copyright © 2023 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.