Answers for "how to concatenate two strings in swift"

1

swift string concatenation

let age = 28
let name = "John"
let isAlcoholic = true

var description = "\(name) is \(age) years old and \(isAlcoholic ? "is" : "isn't") alcoholic"
Posted by: Guest on February-22-2021
1

how to concatenate two strings in swift

var greet = "Hello, "
let name = "Jack"

// using + operator
var result = greet + name
print(result)

//using =+ operator
greet +=  name
print(greet)
Posted by: Guest on May-07-2021
1

concatenate string swift

let string1 = "hello"
let string2 = " there"
var welcome = string1 + string2 // hello there
Posted by: Guest on February-11-2021

Code answers related to "how to concatenate two strings in swift"

Browse Popular Code Answers by Language