Combining characters
Author |
Message |
xHoly-Divinity
|
Posted: Sat Sep 29, 2007 12:25 pm Post subject: 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 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
StealthArcher
|
Posted: Sat Sep 29, 2007 12:37 pm Post subject: Re: Combining characters |
|
|
For loop and append. |
|
|
|
|
|
xHoly-Divinity
|
Posted: Sat Sep 29, 2007 12:58 pm Post subject: 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
code: |
StringBuilder word;
word = word.append ('a');
|
This is just a representation... how would it actually work? |
|
|
|
|
|
xHoly-Divinity
|
Posted: Sat Sep 29, 2007 1:13 pm Post subject: Re: Combining characters |
|
|
Ahhh, you need to create a stringBuffer first. I got it working, thanks |
|
|
|
|
|
|
|