string - Append text with variables Objective C -


i trying append text without success until tryied this:

nsstring *n_result = @""; n_result = [n_result stringbyappendingstring:[nsstring stringwithformat:@"the number "]];     n_result = [n_result stringbyappendingstring:[nsstring stringwithformat:@"%@ ", n_analyze]];     n_result = [n_result stringbyappendingstring:[nsstring stringwithformat:@", has "]];     n_result = [n_result stringbyappendingstring:[nsstring stringwithformat:@"%i ", steps]];     n_result = [n_result stringbyappendingstring:[nsstring stringwithformat:@"steps reach 1"]]; 

the thing is, there must simpler way of doing this. don't know how. can me this? have been searching everywhere how "better".

[nsstring stringwithformat:@"the number %@ , has %i steps reach 1", n_analyze, steps]


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -