Swift is an open source programming language that supports multiple programming paradigms and compiled. It was released by Apple at WWDC (Apple Developer Conference) in 2014 and is used to develop iOS, OS X and watchOS applications.

Swift combines the best of C and Objective-C without the limitations of C compatibility.

Swift can use the same running environment as Objective-C on Mac OS and iOS platforms.

Swift string syntax

A Swift string is a collection of characters. For example, "Hello, World!" is a collection of ordered character type values, and its data type is String.

Swift string example

import Cocoa
// Use string literals
var stringA = "Hello, World!"
print(stringA)
// String instantiation
var stringB = String("Hello, World!")
print(stringB)