Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic .NET (http://www.programmingforums.org/forum19.html)
-   -   String to Individual Character Conversion (http://www.programmingforums.org/showthread.php?t=14081)

mattireland Oct 1st, 2007 7:10 PM

String to Individual Character Conversion
 
Hi,

I'm back! :( i bet ur all glad.

I've got a string from a text box and I need this converting into individual characters e.g. if I input "hello i'm here" i should like this to be converted to "h" "e" "l" "l" "o" e.t.c.

i'm not sure of how to do this. I'm using VS 2005 Express.

Thanks!

Matt. I

john Wesley Oct 1st, 2007 9:26 PM

string.ToCharArray() ought to do it I should think.

DaWei Oct 1st, 2007 9:52 PM

Or just press F1 and ask....

mattireland Oct 2nd, 2007 1:05 PM

Thanks guys!

Is there any way that I could get each character as a variable just so I can work on them e.g. if the second character in the string was called l2 and had a value of "a" I could have a something like this:

If l2 = "a" Then
d2 = "b"
End If

Thanks again!

Matt.

EDIT: I've just found this, is it any good? Just so I know before reading it!

http://articles.techrepublic.com.com...3-6030362.html

mattireland Oct 2nd, 2007 5:34 PM

It's alright I'm pretty much sorted now.


All times are GMT -5. The time now is 2:59 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC