Leaders dynamic_sysop Posted October 8, 2002 Leaders Posted October 8, 2002 i currently reference the msn chat control library to convert from ansii text like say "â�¢Ã�ynamicâ�²Â§â�¢Ã�row§erâ�¢" to "�Ðynamic′§�ßrow§er�" readable format, to do this requires Msn.ConvertedString , however i was wondering if it is possible to convert from ansii / utf8 to unicode without having to use a large ocx file like the msn chat control? say like sName = unicode(sName) Quote
Leaders dynamic_sysop Posted October 8, 2002 Author Leaders Posted October 8, 2002 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" Quote
*Experts* Bucky Posted October 8, 2002 *Experts* Posted October 8, 2002 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) sValue = Data.Left(3) For your text conversion, look in the System.Text namespace for various encoders and decoders. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Leaders dynamic_sysop Posted October 8, 2002 Author Leaders Posted October 8, 2002 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 Quote
*Gurus* divil Posted October 8, 2002 *Gurus* Posted October 8, 2002 .Substring Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Leaders dynamic_sysop Posted October 8, 2002 Author Leaders Posted October 8, 2002 i'm tearin me hair out :( i've 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 Quote
*Experts* Bucky Posted October 8, 2002 *Experts* Posted October 8, 2002 Sorry for confusing you with .Left, I could've sworn it was there... :) And the reason it isn't working is because now all indexes are zero-based. That means that the first character's index is 0, unlike Mid$ where the first character has the index 1. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
*Gurus* Derek Stone Posted October 8, 2002 *Gurus* Posted October 8, 2002 The first parameter in Substring is 0 based. That means the first character would be Substring(0,1). Quote Posting Guidelines
Leaders dynamic_sysop Posted October 8, 2002 Author Leaders Posted October 8, 2002 cheers dude the 0 worked "If s.Substring(0, 1) = "." Then Me.BeGold(s)" slowely getting to grips with it all Quote
*Gurus* divil Posted October 8, 2002 *Gurus* Posted October 8, 2002 Or you can use the nifty .StartsWith method If myString.StartsWith(".") Then 'blah Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.