-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,335
  • 20
  • 91
  • 93
rani
  • 593
  • 3
  • 10
  • 27

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
  • 29,791
  • 9
  • 67
  • 99