PDA

Click to See Complete Forum and Search --> : Select a character of a string


Wouter
Nov 14th, 1999, 05:14 PM
Hi

Now I got a simple question: How do I select a character of a string.
e.g. the third character of the string "Visual Basic" would be "s"
What is the way to do this?

Regards
Wouter

locutus
Nov 14th, 1999, 05:36 PM
to select the third char try this

dim hold as string

hold = mid("visual basic",3,1)

hold now contains the char S

the 3,1 indicates to start at the third position and return everything in the length
in this case 1. if the length required was 2 it would return su

hope this helps > locutus