String function
How do you get a substring from string? e.g.
string2 = "Student@School@City"
in this case student is separated from scool by "@" character
Ho do I get student from string2 using VBScript ot JavaScript?
Thanks
How do you get a substring from string? e.g.
string2 = "Student@School@City"
in this case student is separated from scool by "@" character
Ho do I get student from string2 using VBScript ot JavaScript?
Thanks
Mark Hensler posted this at 23:24 — 20th November 2001.
He has: 4,048 posts
Joined: Aug 2000
Using what language?
Peter J. Boettcher posted this at 15:08 — 21st November 2001.
They have: 812 posts
Joined: Feb 2000
Well if the separating character is always going to be an '@' then in VBScript you could use something like:
string2 = "Student@School@City"
EndAt = InStr(1,string2,"@") - 1
FinalString = Mid(string2,1,EndAt)
PJ | Are we there yet?
pjboettcher.com
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.