Swift Type Casting
Swift Type Casting Type Casting consists of two things Type Checking Changing the Type is an operator is used to check the type of an instance type? as an operator is used to casting the instance to another type. Swift Type Checking Swift gives a lot of priority to the
Swift Tuple
Swift Tuple Tuples can hold zero or more values. The values need not be of the same type. Tuples in Swift are like mini Struct and should be used for storing temporary values only. Tuples are handy when we have to return multiple values from a function. Creating a Tuple
Swift String
Swift String String in Swift is an ordered collection of values that are of the type of Character. Similar to Arrays, String defined with var are mutable and strings defined with let keyword are immutable. import Foundation var title = “baluTutorial” let subTitle = “Programming is fun” //immutable From Swift 4 onwards Strings
Swift Set
Swift Set Swift Sets are a data structure type that holds unique values of the same type in an unordered fashion. Set can only take types that conform to the Hashable protocol. Sets store the values based on the hashValue() thanks to the hashable protocol. Hence the access time is constant in sets. A