|
-
Oct 10th, 2000, 04:19 PM
#1
Hi there, I would need to know if there's a way to read characters of any given string variable with vbscript. In my case all I need to find out is the first character of a string. This is how I picture the codes:
strvar = "A1"
firstchar = strvar(0)
... but I know if I do this I would then make reference to an array which isn't what I wanna do. If you have a better way to do it please let me know. Thanks.
-
Oct 10th, 2000, 04:31 PM
#2
Frenzied Member
Are the Left$, Mid$ and Right$ functions available in VBScript? (I've never done any VBScript)
If so, then firstchar = Left$(strvar, 1) will do it.
-
Oct 10th, 2000, 07:38 PM
#3
Frenzied Member
Actually they are but without the $
In VBScript, everything is a variant so you have to use the Left(), Right() and Mid() functions instead.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|