
-----------------------------------
xHoly-Divinity
Sat Sep 29, 2007 12:25 pm

Combining characters
-----------------------------------
Suppose I had the characters 'a', 'b', and 'c'... Is there any way I can combine these characters into a single variable (i.e. a string). Also, I don't know the number of characters there will be. Thanks

-----------------------------------
StealthArcher
Sat Sep 29, 2007 12:37 pm

Re: Combining characters
-----------------------------------
For loop and append.

-----------------------------------
xHoly-Divinity
Sat Sep 29, 2007 12:58 pm

Re: Combining characters
-----------------------------------
Could you please elaborate a bit. How would it work for the example 'a', 'b', 'c'?

Using StringBuilder, would it be something along the lines of


StringBuilder word;
word = word.append ('a');


This is just a representation... how would it actually work?

-----------------------------------
xHoly-Divinity
Sat Sep 29, 2007 1:13 pm

Re: Combining characters
-----------------------------------
Ahhh, you need to create a stringBuffer first. I got it working, thanks :mrgreen:
