AjooAli Dar wrote:
Thanks I can use append. but i dont want : to be appended at the end.
company.append(partyName);
company.append(":");
I want
IBM:HP:CISCO
what I am getting IBM:HP:CISCO:
So, right now you're saying "add the company name, and then add the :", when what you really should be saying is, "add the company name, and then,
if it's not the last one, add the :"
Got that so far?
Now, before you end up beating your head against the wall on that, I'll point out that it's generally easier to implement if you turn it around to, "if it's not the first one, add a :, and then add the company name". That is instead of adding a colon after every one but the last, add it before every one but the first.