ios - Separate NSMutablestring with comma -


this question has answer here:

i'm trying append 2 nsmutablestring, want make comma separation between them. right code use this:

nsstring *astring = @"this string"; teststring = [[nsmutablestring alloc]init]; [teststring appendstring:astring]; nslog(@"%@",teststring); 

the result :this stringthis string

i try with:

[teststring appendformat:@",%@",astring]; 

but still no luck.

please help, regards.

  teststring = [[nsmutablestring alloc]init];  [teststring appendstring:@","];   [teststring appendstring:astring]; 

Comments