Ignoring/removing first letter in a strting

# Thread: Ignoring/removing first letter in a strting

1. Senior Member
Join Date
Dec 1969
Posts
473

## Ignoring/removing first letter in a strting

Is there a way I can remove the first letter in a string e.g. Mazza to give azza or 12345 to give 2345 etc..<BR><BR>Cheers!

2. Senior Member
Join Date
Dec 1969
Posts
541

## Look Here...At...Mid...

Look at mid...<BR><BR>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtorifunctions.asp

3. Senior Member
Join Date
Dec 1969
Posts
473

## strFileName = Mid(strFileName, 2) ah..ha.

Thanks, got it now!<BR><BR>Using<BR>strFileName = Mid(strFileName, 2, Len(strFileName)) <BR><BR>Mazza ;)

4. Senior Member
Join Date
Dec 1969
Posts
541

## You don't have to include the Len()

You don&#039;t have to use the Len as end parameter, its optional...

5. Senior Member
Join Date
Dec 1969
Posts
170

## Another way..

Another way of doing this would have been:<BR><BR>strMazza = "123456"<BR>strAzza = Right(strMazza, (Len(strMazza) - 1))<BR><BR>The Len(strMazza) returns the number of characters in strMazza (6), we minus 1 from this as we want 1 less character (hence the 5), and we use the right function to count characters from the right<BR><BR>Hope you find this useful :)<BR>Renee

6. Member
Join Date
Dec 1969
Posts
83

## RE: Another way.. but why use LEN()

using strFileName = Mid(strFileName, 2)<BR>is better than using strAzza = Right(strMazza, (Len(strMazza) - 1))<BR><BR>look here:<BR>http://www.aspmessageboard.com/forum/asp.asp?M=383818&F=20&P=1<BR><BR>hope u find this useful :)<BR>raj

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•