---
title: "Concatenate 2 or more NSString into 1 NSString in Objective-C"  
description: "Concatenate 2 or more NSString into 1 NSString in Objective-C"  
author: "Anonymous User"  
published: 2015-11-07  
updated: 2015-11-08  
canonical: https://www.mindstick.com/forum/33579/concatenate-2-or-more-nsstring-into-1-nsstring-in-objective-c  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# Concatenate 2 or more NSString into 1 NSString in Objective-C

I am new in Objective-C [programming](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming), can any one tell me how to [Concatenate](https://www.mindstick.com/interview/1431/how-do-you-concatenate-strings-in-mysql) 2 or more NSString into 1 NSString with comma(,) sign.\
For example I have 3 [strings](https://www.mindstick.com/forum/161912/explain-the-python-strings) like this:\
NSString *country1 = @"[India](https://www.mindstick.com/articles/12769/why-consider-international-business-mba-in-india)";\
NSString *country2 = @"[China](https://www.mindstick.com/articles/12994/how-foreigners-can-access-blocked-websites-in-china)";\
NSString *country3 = @"Japan";\
\
I want to make a single [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) to [store](https://www.mindstick.com/articles/13125/tips-to-increase-sales-of-your-woocommerce-store) and in [future](https://yourviews.mindstick.com/audio/1195/ayurveda-ancient-wisdom-for-modern-wellness-and-future-health) I want to separate all these [values](https://www.mindstick.com/forum/327/sum-textbox-values) by given sign.

## Replies

### Reply by Tarun Kumar

You can use NSArray method 'stringWithFormat: ' to add two or more string variables into an array.

For example:

```
NSString *Name = @"India"; NSString *Code = @"+91";NSMutableArray *countryObject = [[NSMutableArray alloc]init];[countryObject addObject:[NSString stringWithFormat:@"%@ %@ %@", Name, @",", Code]];
```

and also you can see I am concating two strings separated with comma(,) because in future, we can split this string by comma(,) as needed.


---

Original Source: https://www.mindstick.com/forum/33579/concatenate-2-or-more-nsstring-into-1-nsstring-in-objective-c

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
