-1

I would like to get final String like below:

var urlString = "http://testurl.com/contacts=["1111111","2222222"]"

There are three strings http://testurl.com/contacts= , 1111111 and 2222222

How to concatenate these strings in Swift

Kampai
  • 22,848
  • 21
  • 95
  • 95
rani
  • 593
  • 3
  • 10
  • 28

1 Answers1

0
var str1 =  "http://testurl.com/contacts="
var str2 = "1111111"
var str3 = "2222222"
var finalString = "\(str1)[\"\(str2)\",\"\(str3)\"]"

enter image description here

Shamsudheen TK
  • 30,739
  • 9
  • 69
  • 102