String Manupulation
-
Hi All, I have a string. I want to put all characters in an arraylist. How to do it? Help me. Regards, Jegastar
-
Hi All, I have a string. I want to put all characters in an arraylist. How to do it? Help me. Regards, Jegastar
This'll float ya boat im sure: a string is a list, it is simply a list of
char
's. You can access them in much the same way as any liststring myString = "Hello World"; char char0 = myString[0]; // H char char3 = myString[3]; // l
Also, as noted above you can use the ToCharArray() to get it as a simpler array to use elsewhere. -
This'll float ya boat im sure: a string is a list, it is simply a list of
char
's. You can access them in much the same way as any liststring myString = "Hello World"; char char0 = myString[0]; // H char char3 = myString[3]; // l
Also, as noted above you can use the ToCharArray() to get it as a simpler array to use elsewhere.