also is there a Left function in .net? i use this alot in vb6, like say you have a row of data like ":TKCHATACHAT001" and you put sValue = Left(Data , 3)
sValue would be ":TK"
You can access all the old VB6 String functions (Left, Right, Split,
and Mid which is now called Substring, etc.) by typing any string
variable followed by a . and the name, just like accessing any method
from a class. You can also do this with any normal string,
"like this".Left(4)
Code:
sValue = Data.Left(3)
For your text conversion, look in the System.Text namespace for
various encoders and decoders.
when i do sValue = snick.Left it returns Left is not a member of string, it doesnt give left or mid or right as an option on the drop down menu, most odd
im tearin me hair out ive tried....
Dim s as string
If s.Substring(1, 1) = "." Then Me.BeGold(s)
( ".") being the first character of the nickname
also tried
If s.Substring(1, s) = "." Then Me.BeGold(s)
and If s.Substring(1, 1) is "." Then Me.BeGold(s)
nothing seems to be working tho :S
Sorry for confusing you with .Left, I couldve sworn it was there...
And the reason it isnt working is because now all indexes are
zero-based. That means that the first characters index is 0, unlike
Mid$ where the first character has the index 1.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.