![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
|
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 |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
string.ToCharArray() ought to do it I should think.
__________________
Mona Lisa must of had the highway blues you can tell by the way she smiles.. |
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Or just press F1 and ask....
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
|
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 Last edited by mattireland; Oct 2nd, 2007 at 12:54 PM. Reason: See above |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
|
It's alright I'm pretty much sorted now.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| An Attempt at a DBMS | grimpirate | PHP | 8 | Apr 17th, 2007 1:01 PM |
| Function Parameters | grimpirate | PHP | 10 | Mar 14th, 2007 6:55 PM |
| C# corruption!!! | Kilo | C++ | 32 | May 21st, 2006 8:44 PM |
| Problems with String to MD5 Conversion | emdiesse | Visual Basic .NET | 0 | Feb 2nd, 2006 10:25 AM |
| replace space with ' * ' | TecBrain | C++ | 15 | Apr 13th, 2005 12:32 PM |