Last active
September 20, 2023 21:55
-
-
Save clarkeben/bf0b64490f5975ec943b3cebcce72f9f to your computer and use it in GitHub Desktop.
swift-string-concatenation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let messages = ["Hi", "welcome", "to", "my", "home"] | |
let combinedMessages = messages.joined(separator: " ") //Hi welcome to my home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let firstName = "John" | |
let lastName = "Doe" | |
let fullName = firstName + " " + lastName //John Doe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let address = "742 Evergreen Terrace" | |
let message = "I live at \(address)!" //I live at 742 Evergreen Terrace! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment