hi all,
just after a bit of beginner advice really, i am trying to concatenate 2 NSString variables i have but to be honest its not working out like i hoped...
any help would be great. i have seen loads of examples of appending literal strings to new variables etc but none of it seems to work when i try it.
i have a loop that goes around 0 - 30 and during that loop it randomly picks an array item, this gets stored into an NSString, what i want todo is append all the items together in the array with maybe a space inbetween.
i have tried with no success both items below
[mystring appendString:[myarray objectAtIndex:loopcount]];
mystring = [mystring appendString:[myarray objectAtIndex:loopcount]];
can someone please point me in the direction of what i need to sort this out?
i come from a delphi background and it was as easy as
mystr := mystr + array
HELP PLEASE
thanks
kris
just after a bit of beginner advice really, i am trying to concatenate 2 NSString variables i have but to be honest its not working out like i hoped...
any help would be great. i have seen loads of examples of appending literal strings to new variables etc but none of it seems to work when i try it.
i have a loop that goes around 0 - 30 and during that loop it randomly picks an array item, this gets stored into an NSString, what i want todo is append all the items together in the array with maybe a space inbetween.
i have tried with no success both items below
[mystring appendString:[myarray objectAtIndex:loopcount]];
mystring = [mystring appendString:[myarray objectAtIndex:loopcount]];
can someone please point me in the direction of what i need to sort this out?
i come from a delphi background and it was as easy as
mystr := mystr + array
HELP PLEASE
thanks
kris