strings in vb
Author |
Message |
Homer_simpson
|
Posted: Sun Nov 09, 2003 2:34 pm Post subject: strings in vb |
|
|
say i got this string:
s="jackass"
how can i make it print the third character "c"
i tried print s(3) but it doesn't work like that =( |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Sun Nov 09, 2003 3:16 pm Post subject: (No subject) |
|
|
well, to use substrings in VB, you can use Mid(from:int, length:int)
so 3rd character would be
Mid(3,1)
Now the string itself also probably goes somewhere... but since I don't currently have VB installed, I can't say for sure.
There're also Left() and Right() I think If you need to cut a side off or something |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
|
|